diff --git a/dapps/react-dapp-v2-cosmos-provider/src/App.tsx b/dapps/react-dapp-v2-cosmos-provider/src/App.tsx index db1bedb..7233fc4 100644 --- a/dapps/react-dapp-v2-cosmos-provider/src/App.tsx +++ b/dapps/react-dapp-v2-cosmos-provider/src/App.tsx @@ -123,6 +123,10 @@ export default function App() { const address = account.split(":").pop(); + if (!address) { + throw new Error(`Could not derive address from account: ${account}`); + } + // cosmos_signDirect params const params = { signerAddress: address, @@ -161,6 +165,10 @@ export default function App() { const address = account.split(":").pop(); + if (!address) { + throw new Error(`Could not derive address from account: ${account}`); + } + // cosmos_signAmino params const params = { signerAddress: address, signDoc };