Skip to content

Commit

Permalink
web: Add misconfigured connection warning for all wallets, closes #212
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Petrov <[email protected]>
  • Loading branch information
mike-petrov committed Sep 4, 2024
1 parent 5912975 commit 937abe6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ const Profile = ({
<div>Check web app configuration or try later</div>
</Box>
)}
{walletData.net.toLowerCase().indexOf(activeNet.toLowerCase()) === -1 && (
<Box style={{ fontSize: 14, wordBreak: 'break-all', background: '#fece0f' }}>
<div style={{ fontSize: 20, fontWeight: 'bold' }}>{`Сonnected wallet uses ${walletData.net} network`}</div>
<div>{`Panel is configured for ${activeNet}, mismatching networks can lead to incorrect behavior.`}</div>
</Box>
)}
<Box id="account">
<Heading style={{ marginBottom: 15 }} weight="bold">
<span style={{ margin: '0 15px 0 0' }}>{formatAddress(walletData.account.address)}</span>
Expand Down

0 comments on commit 937abe6

Please sign in to comment.