diff --git a/packages/ui/src/components/WalletConnect/WalletConnectActiveSessions.tsx b/packages/ui/src/components/WalletConnect/WalletConnectActiveSessions.tsx index eadb3b03..16fe2bee 100644 --- a/packages/ui/src/components/WalletConnect/WalletConnectActiveSessions.tsx +++ b/packages/ui/src/components/WalletConnect/WalletConnectActiveSessions.tsx @@ -41,8 +41,8 @@ export const WalletConnectActiveSessions = () => {
diff --git a/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx b/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx index 9e6492c3..661e4249 100644 --- a/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx +++ b/packages/ui/src/components/modals/WalletConnectSessionProposal.tsx @@ -33,7 +33,7 @@ const WalletConnectSessionProposal = ({ onClose, className, sessionProposal }: P useEffect(() => { if (!web3wallet || !sessionProposal) return - const wCRequestedNetwork = sessionProposal?.params.requiredNamespaces.polkadot.chains?.[0] + const wCRequestedNetwork = sessionProposal?.params.requiredNamespaces?.polkadot?.chains?.[0] if (wCRequestedNetwork !== currentNamespace) { setErrorMessage( @@ -53,7 +53,7 @@ const WalletConnectSessionProposal = ({ onClose, className, sessionProposal }: P namespaces: { polkadot: { accounts: accountsToShare, - methods: sessionProposal.params.requiredNamespaces.polkadot.methods, + methods: sessionProposal.params.requiredNamespaces?.polkadot?.methods, events: [] } } @@ -90,7 +90,7 @@ const WalletConnectSessionProposal = ({ onClose, className, sessionProposal }: P WalletConnect Connection Request - {!!errorMessage && {errorMessage}} + {!!errorMessage && {errorMessage}} Website: {sessionProposal?.params.proposer.metadata.url}
Methods:{' '} - {sessionProposal?.params.requiredNamespaces.polkadot?.methods.map( + {sessionProposal?.params.requiredNamespaces?.polkadot?.methods?.map( (method, index) => `${method}${ index === - (sessionProposal?.params.requiredNamespaces.polkadot?.methods.length - 1 || 0) + (sessionProposal?.params.requiredNamespaces?.polkadot?.methods?.length - 1 || 0) ? '' : ', ' }` @@ -180,6 +180,11 @@ const ButtonContainerStyled = styled(Grid)` margin-left: 1rem; } ` + +const AlertStyled = styled(Alert)` + margin-bottom: 1rem; +` + export default styled(WalletConnectSessionProposal)` .accountEdition { margin-bottom: 1rem;