wc: handle case when peerMeta doesn't provide icon
commit7a88f9d8a23d978308323b01539e9c8213e7fcdf
authortomholford <tomholford@users.noreply.github.com>
dateThu 12 Aug 2021, 12:04 (5 years ago)
parent7f9d7df
src/lib/useWalletConnect.ts+1−1
@@ -12,7 +12,7 @@ import WalletConnectWallet from './types/WalletConnectWallet';
1212
1313type PeerMeta = {
1414 description: string;
15− icons: string[];
15+ icons?: string[];
1616 name: string;
1717 url: string;
1818};
src/views/Login/WalletConnect.tsx+1−1
@@ -41,7 +41,7 @@ const WalletConnectLogin = ({ className, goHome }) => {
4141 <Grid.Item full className="f6 gray5 mt3 mb3">
4242 <Grid>
4343 <Grid.Item style={{ gridArea: 'auto / 3 / auto / 5' }}>
44− {peerMeta.icons.length > 0 ? (
44+ {peerMeta.icons && peerMeta.icons.length > 0 ? (
4545 <Image src={peerMeta.icons[0]} />
4646 ) : (
4747 <LegacyText>Icon Unavailable</LegacyText>