fix(cosmos-provider): handle possibly undefined address
This commit is contained in:
parent
b8515abe6e
commit
32afbb373c
@ -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 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user