diff --git a/__fixtures__/output1/cosmos/staking/v1beta1/tx.amino.ts b/__fixtures__/output1/cosmos/staking/v1beta1/tx.amino.ts index 7422a6de45..6591c296d4 100644 --- a/__fixtures__/output1/cosmos/staking/v1beta1/tx.amino.ts +++ b/__fixtures__/output1/cosmos/staking/v1beta1/tx.amino.ts @@ -140,7 +140,7 @@ export const AminoConverter = { minSelfDelegation: min_self_delegation, delegatorAddress: delegator_address, validatorAddress: validator_address, - pubkey: encodePubkey(pubkey.value), + pubkey: encodePubkey(pubkey), value: { denom: value.denom, amount: value.amount diff --git a/__fixtures__/v-next/outputosmojs/cosmos/staking/v1beta1/tx.amino.ts b/__fixtures__/v-next/outputosmojs/cosmos/staking/v1beta1/tx.amino.ts index 36b8fac650..86e67cabcd 100644 --- a/__fixtures__/v-next/outputosmojs/cosmos/staking/v1beta1/tx.amino.ts +++ b/__fixtures__/v-next/outputosmojs/cosmos/staking/v1beta1/tx.amino.ts @@ -139,7 +139,7 @@ export const AminoConverter = { minSelfDelegation: min_self_delegation, delegatorAddress: delegator_address, validatorAddress: validator_address, - pubkey: encodePubkey(pubkey.value), + pubkey: encodePubkey(pubkey), value: { denom: value.denom, amount: value.amount diff --git a/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/staking.ts b/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/staking.ts index 934eff4a1f..19d63a2fdb 100644 --- a/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/staking.ts +++ b/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/staking.ts @@ -3283,7 +3283,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: _m0.Reader | Uint8Ar } }; export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { - return encodePubkey(content.value); + return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any) => { return decodePubkey(content); diff --git a/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/tx.ts b/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/tx.ts index dc77a00808..91ed74b1db 100644 --- a/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/tx.ts +++ b/__fixtures__/v-next/outputv2/cosmos/staking/v1beta1/tx.ts @@ -1337,7 +1337,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: _m0.Reader | Uint8Ar } }; export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { - return encodePubkey(content.value); + return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any) => { return decodePubkey(content); diff --git a/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/staking.ts b/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/staking.ts index cacdf64223..8954b06ba3 100644 --- a/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/staking.ts +++ b/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/staking.ts @@ -3283,7 +3283,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: _m0.Reader | Uint8Ar } }; export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { - return encodePubkey(content.value); + return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any) => { return decodePubkey(content); diff --git a/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/tx.ts b/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/tx.ts index fb5619ef8c..7b14affd19 100644 --- a/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/tx.ts +++ b/__fixtures__/v-next/outputv3/cosmos/staking/v1beta1/tx.ts @@ -1337,7 +1337,7 @@ export const Cosmos_cryptoPubKey_InterfaceDecoder = (input: _m0.Reader | Uint8Ar } }; export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { - return encodePubkey(content.value); + return encodePubkey(content); }; export const Cosmos_cryptoPubKey_ToAmino = (content: Any) => { return decodePubkey(content); diff --git a/__fixtures__/v-next/outputv4/cosmos/staking/v1beta1/tx.amino.ts b/__fixtures__/v-next/outputv4/cosmos/staking/v1beta1/tx.amino.ts index 36b8fac650..86e67cabcd 100644 --- a/__fixtures__/v-next/outputv4/cosmos/staking/v1beta1/tx.amino.ts +++ b/__fixtures__/v-next/outputv4/cosmos/staking/v1beta1/tx.amino.ts @@ -139,7 +139,7 @@ export const AminoConverter = { minSelfDelegation: min_self_delegation, delegatorAddress: delegator_address, validatorAddress: validator_address, - pubkey: encodePubkey(pubkey.value), + pubkey: encodePubkey(pubkey), value: { denom: value.denom, amount: value.amount diff --git a/packages/ast/src/encoding/amino/converter/__snapshots__/amino-converter.spec.ts.snap b/packages/ast/src/encoding/amino/converter/__snapshots__/amino-converter.spec.ts.snap index c761729c7a..08978fda8a 100644 --- a/packages/ast/src/encoding/amino/converter/__snapshots__/amino-converter.spec.ts.snap +++ b/packages/ast/src/encoding/amino/converter/__snapshots__/amino-converter.spec.ts.snap @@ -61,7 +61,7 @@ exports[`cosmos/staking/v1beta1/tx AminoConverter 1`] = ` minSelfDelegation: min_self_delegation, delegatorAddress: delegator_address, validatorAddress: validator_address, - pubkey: encodePubkey(pubkey.value), + pubkey: encodePubkey(pubkey), value: { denom: value.denom, amount: value.amount diff --git a/packages/ast/src/encoding/amino/from-amino-json/utils.ts b/packages/ast/src/encoding/amino/from-amino-json/utils.ts index c85e0193fb..3ef30e9e0b 100644 --- a/packages/ast/src/encoding/amino/from-amino-json/utils.ts +++ b/packages/ast/src/encoding/amino/from-amino-json/utils.ts @@ -346,10 +346,7 @@ export const fromAmino = { t.callExpression( t.identifier('encodePubkey'), [ - t.memberExpression( - t.identifier('pubkey'), - t.identifier('value') - ) + t.identifier('pubkey') ] ) ) diff --git a/packages/ast/src/encoding/proto/implements/__tests__/__snapshots__/interface-from-amino.test.ts.snap b/packages/ast/src/encoding/proto/implements/__tests__/__snapshots__/interface-from-amino.test.ts.snap index 97f17a689a..5090e39cac 100644 --- a/packages/ast/src/encoding/proto/implements/__tests__/__snapshots__/interface-from-amino.test.ts.snap +++ b/packages/ast/src/encoding/proto/implements/__tests__/__snapshots__/interface-from-amino.test.ts.snap @@ -2,7 +2,7 @@ exports[`MsgCreateValidator MsgCreateValidator 1`] = ` "export const Cosmos_cryptoPubKey_FromAmino = (content: AnyAmino) => { - return encodePubkey(content.value); + return encodePubkey(content); };" `; diff --git a/packages/ast/src/encoding/proto/implements/from-amino.ts b/packages/ast/src/encoding/proto/implements/from-amino.ts index 188e0f97b9..729141638b 100644 --- a/packages/ast/src/encoding/proto/implements/from-amino.ts +++ b/packages/ast/src/encoding/proto/implements/from-amino.ts @@ -53,12 +53,7 @@ export const createInterfaceFromAmino = ( return makeFunctionWrapper(functionName, t.returnStatement( t.callExpression( t.identifier('encodePubkey'), - [ - t.memberExpression( - t.identifier('content'), - t.identifier('value') - ) - ] + [t.identifier('content')] ) )); }