import { CHAINS , SOLANA_NETWORKS , SOLANA_PROTOCOLS } from 'types' ; import { getNodeURL as getNodeUrl } from 'utils/datahub' ; export const accountExplorer = ( network ) => ( address ) => { if ( network === SOLANA_NETWORKS . LOCALNET ) { return `https://explorer.solana.com/address/${ address }?cluster=custom&customUrl=http://127.0.0.1:8899` ; } else { return `https://explorer.solana.com/address/${ address }?cluster=devnet` ; } } ; export const transactionExplorer = ( network ) => ( hash ) => { if ( network === SOLANA_NETWORKS . LOCALNET ) { return `https://explorer.solana.com/tx/${ hash }?cluster=custom&customUrl=http://127.0.0.1:8899` ; } else { return `https://explorer.solana.com/tx/${ hash }?cluster=devnet` ; } } ; export const getNodeURL = ( network ? ) => getNodeUrl ( CHAINS . SOLANA , SOLANA_NETWORKS . DEVNET , SOLANA_PROTOCOLS . RPC , network ) ;