import React, { useContext } from "react" import { WalletType } from "@rarible/sdk-wallet" import { Box } from "@mui/material" import { Page } from "../../components/page" import { ConnectorContext } from "../../components/connector/sdk-connection-provider" import { CommentedBlock } from "../../components/common/commented-block" import { GetBalanceComment } from "./comments/getbalance-comment" import { NativeBalance } from "./native-balance" import { UnsupportedBlockchainWarning } from "../../components/common/unsupported-blockchain-warning" function validateConditions(blockchain: WalletType | undefined): boolean { return !!blockchain } export function BalancePage() { const connection = useContext(ConnectorContext) const blockchain = connection.sdk?.wallet?.walletType return ( { !validateConditions(blockchain) && ( ) } }> { connection.sdk && connection.sdk.wallet && connection.walletAddress ? : null } ) }