From 7bf5a69455c3b055b0051d811b13672542cdcc8e Mon Sep 17 00:00:00 2001 From: Christopher Brumm <97845034+christopherbrumm@users.noreply.github.com> Date: Tue, 30 Jul 2024 08:24:34 +0200 Subject: [PATCH] fix: amino types (#147) --- common/sdk/src/amino/delegation.amino.ts | 8 ++++---- common/sdk/src/amino/funders.amino.ts | 8 ++++---- common/sdk/src/amino/stakers.amino.ts | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/common/sdk/src/amino/delegation.amino.ts b/common/sdk/src/amino/delegation.amino.ts index 2dd9e774..12b85d75 100644 --- a/common/sdk/src/amino/delegation.amino.ts +++ b/common/sdk/src/amino/delegation.amino.ts @@ -11,7 +11,7 @@ import { isNotEmpty } from "../utils"; export const createDelegationAminoConverters = (): AminoConverters => { return { "/kyve.delegation.v1beta1.MsgDelegate": { - aminoType: "kyve/delegation/MsgDelegate", + aminoType: "/kyve.delegation.v1beta1.MsgDelegate", toAmino: (msg: MsgDelegate) => ({ creator: msg.creator, staker: msg.staker, @@ -24,7 +24,7 @@ export const createDelegationAminoConverters = (): AminoConverters => { }), }, "/kyve.delegation.v1beta1.MsgWithdrawRewards": { - aminoType: "kyve/delegation/MsgWithdrawRewards", + aminoType: "/kyve.delegation.v1beta1.MsgWithdrawRewards", toAmino: (msg: MsgWithdrawRewards) => ({ creator: msg.creator, staker: msg.staker, @@ -35,7 +35,7 @@ export const createDelegationAminoConverters = (): AminoConverters => { }), }, "/kyve.delegation.v1beta1.MsgRedelegate": { - aminoType: "kyve/delegation/MsgRedelegate", + aminoType: "/kyve.delegation.v1beta1.MsgRedelegate", toAmino: (msg: MsgRedelegate) => ({ creator: msg.creator, from_staker: msg.from_staker, @@ -50,7 +50,7 @@ export const createDelegationAminoConverters = (): AminoConverters => { }), }, "/kyve.delegation.v1beta1.MsgUndelegate": { - aminoType: "kyve/delegation/MsgUndelegate", + aminoType: "/kyve.delegation.v1beta1.MsgUndelegate", toAmino: (msg: MsgUndelegate) => ({ creator: msg.creator, staker: msg.staker, diff --git a/common/sdk/src/amino/funders.amino.ts b/common/sdk/src/amino/funders.amino.ts index d97d8f3f..3178daee 100644 --- a/common/sdk/src/amino/funders.amino.ts +++ b/common/sdk/src/amino/funders.amino.ts @@ -11,7 +11,7 @@ import { isNotEmpty } from "../utils"; export const createFundersAminoConverters = (): AminoConverters => { return { "/kyve.funders.v1beta1.MsgFundPool": { - aminoType: "kyve/funders/MsgFundPool", + aminoType: "/kyve.funders.v1beta1.MsgFundPool", toAmino: (msg: MsgFundPool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { pool_id: msg.pool_id }), @@ -26,7 +26,7 @@ export const createFundersAminoConverters = (): AminoConverters => { }), }, "/kyve.funders.v1beta1.MsgDefundPool": { - aminoType: "kyve/funders/MsgDefundPool", + aminoType: "/kyve.funders.v1beta1.MsgDefundPool", toAmino: (msg: MsgDefundPool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { id: msg.pool_id }), @@ -39,7 +39,7 @@ export const createFundersAminoConverters = (): AminoConverters => { }), }, "/kyve.funders.v1beta1.MsgCreateFunder": { - aminoType: "kyve/funders/MsgCreateFunder", + aminoType: "/kyve.funders.v1beta1.MsgCreateFunder", toAmino: (msg: MsgCreateFunder) => ({ creator: msg.creator, ...(isNotEmpty(msg.moniker) && { moniker: msg.moniker }), @@ -58,7 +58,7 @@ export const createFundersAminoConverters = (): AminoConverters => { }), }, "/kyve.funders.v1beta1.MsgUpdateFunder": { - aminoType: "kyve/funders/MsgUpdateFunder", + aminoType: "/kyve.funders.v1beta1.MsgUpdateFunder", toAmino: (msg: MsgUpdateFunder) => ({ creator: msg.creator, ...(isNotEmpty(msg.moniker) && { moniker: msg.moniker }), diff --git a/common/sdk/src/amino/stakers.amino.ts b/common/sdk/src/amino/stakers.amino.ts index fd6c43b6..fa67eabd 100644 --- a/common/sdk/src/amino/stakers.amino.ts +++ b/common/sdk/src/amino/stakers.amino.ts @@ -25,7 +25,7 @@ function jsonDecimalToProto(decimal: string): string { export const createStakersAminoConverters = (): AminoConverters => { return { "/kyve.stakers.v1beta1.MsgCreateStaker": { - aminoType: "kyve/stakers/MsgCreateStaker", + aminoType: "/kyve.stakers.v1beta1.MsgCreateStaker", toAmino: (msg: MsgCreateStaker) => ({ creator: msg.creator, ...(isNotEmpty(msg.amount) && { amount: msg.amount }), @@ -38,7 +38,7 @@ export const createStakersAminoConverters = (): AminoConverters => { }), }, "/kyve.stakers.v1beta1.MsgUpdateMetadata": { - aminoType: "kyve/stakers/MsgUpdateMetadata", + aminoType: "/kyve.stakers.v1beta1.MsgUpdateMetadata", toAmino: (msg: MsgUpdateMetadata) => ({ creator: msg.creator, ...(isNotEmpty(msg.moniker) && { moniker: msg.moniker }), @@ -59,7 +59,7 @@ export const createStakersAminoConverters = (): AminoConverters => { }), }, "/kyve.stakers.v1beta1.MsgUpdateCommission": { - aminoType: "kyve/stakers/MsgUpdateCommission", + aminoType: "/kyve.stakers.v1beta1.MsgUpdateCommission", toAmino: (msg: MsgUpdateCommission) => ({ creator: msg.creator, commission: protoDecimalToJson(msg.commission), @@ -70,7 +70,7 @@ export const createStakersAminoConverters = (): AminoConverters => { }), }, "/kyve.stakers.v1beta1.MsgClaimCommissionRewards": { - aminoType: "kyve/stakers/MsgClaimCommissionRewards", + aminoType: "/kyve.stakers.v1beta1.MsgClaimCommissionRewards", toAmino: (msg: MsgClaimCommissionRewards) => ({ creator: msg.creator, amounts: [...msg.amounts], @@ -81,7 +81,7 @@ export const createStakersAminoConverters = (): AminoConverters => { }), }, "/kyve.stakers.v1beta1.MsgJoinPool": { - aminoType: "kyve/stakers/MsgJoinPool", + aminoType: "/kyve.stakers.v1beta1.MsgJoinPool", toAmino: (msg: MsgJoinPool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { pool_id: msg.pool_id }), @@ -96,7 +96,7 @@ export const createStakersAminoConverters = (): AminoConverters => { }), }, "/kyve.stakers.v1beta1.MsgLeavePool": { - aminoType: "kyve/stakers/MsgLeavePool", + aminoType: "/kyve.stakers.v1beta1.MsgLeavePool", toAmino: (msg: MsgLeavePool) => ({ creator: msg.creator, ...(isNotEmpty(msg.pool_id) && { pool_id: msg.pool_id }),