diff --git a/dapps/react-dapp-v2-with-solana-web3js/public/solana_logo.png b/dapps/react-dapp-v2-with-solana-web3js/public/solana_logo.png new file mode 100644 index 0000000..26aec35 Binary files /dev/null and b/dapps/react-dapp-v2-with-solana-web3js/public/solana_logo.png differ diff --git a/dapps/react-dapp-v2-with-solana-web3js/src/components/Blockchain.tsx b/dapps/react-dapp-v2-with-solana-web3js/src/components/Blockchain.tsx index ac3bb41..725658a 100644 --- a/dapps/react-dapp-v2-with-solana-web3js/src/components/Blockchain.tsx +++ b/dapps/react-dapp-v2-with-solana-web3js/src/components/Blockchain.tsx @@ -97,6 +97,7 @@ interface BlockchainDisplayData { meta: ChainMetadata; } +// eslint-disable-next-line function getBlockchainDisplayData( chainId: string, chainData: ChainNamespaces, @@ -113,18 +114,28 @@ function getBlockchainDisplayData( return { data, meta }; } +// TODO: add `solana` namespace + chains to https://github.com/pedrouid/blockchain-api +// Specifying solana chain metadata manually here for now. const Blockchain: FC> = ( props: PropsWithChildren, ) => { - const { chainData, fetching, chainId, address, onClick, balances, active, actions } = props; + const { fetching, chainId, address, onClick, balances, active, actions } = props; - if (!Object.keys(chainData).length) return null; + // if (!Object.keys(chainData).length) return null; - const chain = getBlockchainDisplayData(chainId, chainData); - if (typeof chain === "undefined") { - return null; - } - const name = chain.meta.name || chain.data.name; + // const chain = getBlockchainDisplayData(chainId, chainData); + // if (typeof chain === "undefined") { + // return null; + // } + + const chain = { + meta: { + name: "Solana", + rgb: "0, 0, 0", + logo: "/solana_logo.png", + }, + }; + const name = chain.meta.name; /*|| chain.data.name;*/ return (