Add label for connected metamask address (#87)

This commit is contained in:
Armani Ferrante 2021-02-20 12:50:36 +08:00 committed by GitHub
parent dac54104fe
commit 1f3be6dcc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -39,6 +39,7 @@ export default function DepositDialog({
publicKey,
balanceInfo,
}) {
const ethAccount = useEthAccount();
const isProdNetwork = useIsProdNetwork();
const urlSuffix = useSolanaExplorerUrlSuffix();
const { mint, tokenName, tokenSymbol, owner } = balanceInfo;
@ -94,6 +95,13 @@ export default function DepositDialog({
<DialogTitle>
Deposit {tokenName ?? mint.toBase58()}
{tokenSymbol ? ` (${tokenSymbol})` : null}
{ethAccount && (
<div>
<Typography color="textSecondary" style={{ fontSize: '14px' }}>
Metamask connected: {ethAccount}
</Typography>
</div>
)}
</DialogTitle>
{tabs}
<DialogContent style={{ paddingTop: 16 }}>

View File

@ -65,6 +65,13 @@ export default function SendDialog({ open, onClose, publicKey, balanceInfo }) {
<DialogTitle>
Send {tokenName ?? abbreviateAddress(mint)}
{tokenSymbol ? ` (${tokenSymbol})` : null}
{ethAccount && (
<div>
<Typography color="textSecondary" style={{ fontSize: '14px' }}>
Metamask connected: {ethAccount}
</Typography>
</div>
)}
</DialogTitle>
{swapCoinInfo ? (
<Tabs