on master help sign in
wc: handle case when peerMeta doesn't provide icon
7a88f9dtomholford
src/lib/useWalletConnect.ts+1−1
@@ -12,7 +12,7 @@ import WalletConnectWallet from './types/WalletConnectWallet';
12
12
13type PeerMeta = {
13type PeerMeta = {
14 description: string;
14 description: string;
15− icons: string[];
15+ icons?: string[];
16 name: string;
16 name: string;
17 url: string;
17 url: string;
18};
18};
src/views/Login/WalletConnect.tsx+1−1
@@ -41,7 +41,7 @@ const WalletConnectLogin = ({ className, goHome }) => {
41 <Grid.Item full className="f6 gray5 mt3 mb3">
41 <Grid.Item full className="f6 gray5 mt3 mb3">
42 <Grid>
42 <Grid>
43 <Grid.Item style={{ gridArea: 'auto / 3 / auto / 5' }}>
43 <Grid.Item style={{ gridArea: 'auto / 3 / auto / 5' }}>
44− {peerMeta.icons.length > 0 ? (
44+ {peerMeta.icons && peerMeta.icons.length > 0 ? (
45 <Image src={peerMeta.icons[0]} />
45 <Image src={peerMeta.icons[0]} />
46 ) : (
46 ) : (
47 <LegacyText>Icon Unavailable</LegacyText>
47 <LegacyText>Icon Unavailable</LegacyText>