diff --git a/src/networks.json b/src/networks.json index d42a2d2e..12173923 100644 --- a/src/networks.json +++ b/src/networks.json @@ -5,8 +5,7 @@ "ownerAddress": "osmovaloper1u5v0m74mql5nzfx2yh43s2tke4mvzghr6m2n5t", "default": true, "maxPerDay": 1, - "authzAminoSupport": true, - "authzAminoExecSupport": false + "authzAminoSupport": true }, { "name": "juno", diff --git a/src/utils/Chain.mjs b/src/utils/Chain.mjs index a86369dc..b33cc96d 100644 --- a/src/utils/Chain.mjs +++ b/src/utils/Chain.mjs @@ -13,7 +13,6 @@ const Chain = (data) => { estimatedApr: data.params?.calculated_apr, authzSupport: data.authzSupport ?? data.params?.authz, authzAminoSupport: data.authzAminoSupport ?? false, - authzAminoExecSupport: data.authzAminoExecSupport ?? data.authzAminoSupport ?? false, denom: data.denom || baseAsset?.base?.denom, display: data.display || baseAsset?.display?.denom, symbol: data.symbol || baseAsset?.symbol, diff --git a/src/utils/Network.mjs b/src/utils/Network.mjs index 71ae1af5..ff43b2f6 100644 --- a/src/utils/Network.mjs +++ b/src/utils/Network.mjs @@ -87,7 +87,6 @@ class Network { this.apyEnabled = data.apyEnabled !== false && !!this.estimatedApr && this.estimatedApr > 0 this.authzSupport = this.chain.authzSupport this.authzAminoSupport = this.chain.authzAminoSupport - this.authzAminoExecSupport = this.chain.authzAminoExecSupport this.defaultGasPrice = this.decimals && format(bignumber(multiply(0.000000025, pow(10, this.decimals))), { notation: 'fixed', precision: 4}) + this.denom this.gasPrice = this.data.gasPrice || this.defaultGasPrice if(this.gasPrice){ diff --git a/src/utils/SigningClient.mjs b/src/utils/SigningClient.mjs index 2ef8a5e7..3bfc5981 100644 --- a/src/utils/SigningClient.mjs +++ b/src/utils/SigningClient.mjs @@ -184,7 +184,7 @@ function SigningClient(network, signer) { let aminoMsgs try { aminoMsgs = convertToAmino(messages) - } catch (e) { } + } catch (e) { console.log(e) } if(aminoMsgs && signer.signAmino){ // Sign as amino if possible for Ledger and Keplr support const signDoc = makeAminoSignDoc(aminoMsgs, fee, chainId, memo, accountNumber, sequence); @@ -241,9 +241,12 @@ function SigningClient(network, signer) { if(message.typeUrl.startsWith('/cosmos.authz') && !network.authzAminoSupport){ throw new Error('This chain does not support amino conversion for Authz messages') } - if(message.typeUrl === '/cosmos.authz.v1beta1.MsgExec' && !network.authzAminoExecSupport){ - // Osmosis MsgExec is broken with Amino currently - throw new Error('This chain does not support amino conversion for Authz Exec messages') + if(message.typeUrl === '/cosmos.authz.v1beta1.MsgExec' && network.path === 'osmosis'){ + // Osmosis MsgExec gov is broken with Amino currently + // See https://github.com/osmosis-labs/cosmos-sdk/pull/342 + if(message.value.msgs.some(msg => msg.typeUrl.startsWith('/cosmos.gov'))){ + throw new Error('Osmosis does not support amino conversion for Authz Exec gov messages') + } } return aminoTypes.toAmino(message) })