From e2e8eeec064826824b83d5d852cbf9cf1a40764d Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 24 Aug 2021 16:38:08 +0200 Subject: [PATCH] Sort toAmino/fromAmino test code --- packages/stargate/src/aminotypes.spec.ts | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/stargate/src/aminotypes.spec.ts b/packages/stargate/src/aminotypes.spec.ts index 338cbe28..5ff91b69 100644 --- a/packages/stargate/src/aminotypes.spec.ts +++ b/packages/stargate/src/aminotypes.spec.ts @@ -37,6 +37,8 @@ import { AminoTypes } from "./aminotypes"; describe("AminoTypes", () => { describe("toAmino", () => { + // bank + it("works for MsgSend", () => { const msg: MsgSend = { fromAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", @@ -89,6 +91,8 @@ describe("AminoTypes", () => { expect(aminoMsg).toEqual(expected); }); + // distribution + it("works for MsgFundCommunityPool", async () => { const msg: MsgFundCommunityPool = { amount: coins(1234, "ucosm"), @@ -163,6 +167,8 @@ describe("AminoTypes", () => { expect(aminoMsg).toEqual(expected); }); + // staking + it("works for MsgBeginRedelegate", () => { const msg: MsgBeginRedelegate = { delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", @@ -318,6 +324,8 @@ describe("AminoTypes", () => { expect(aminoMsg).toEqual(expected); }); + // ibc + it("works for MsgTransfer", () => { const msg: MsgTransfer = { sourcePort: "testport", @@ -417,6 +425,8 @@ describe("AminoTypes", () => { expect(aminoMsg).toEqual(expected); }); + // other + it("works with custom type url", () => { const msg = { foo: "bar", @@ -483,6 +493,8 @@ describe("AminoTypes", () => { }); describe("fromAmino", () => { + // bank + it("works for MsgSend", () => { const aminoMsg: AminoMsgSend = { type: "cosmos-sdk/MsgSend", @@ -535,6 +547,15 @@ describe("AminoTypes", () => { }); }); + // distribution + + // TODO: MsgFundCommunityPool + // TODO: MsgSetWithdrawAddress + // TODO: MsgWithdrawDelegatorReward + // TODO: MsgWithdrawValidatorCommission + + // staking + it("works for MsgBeginRedelegate", () => { const aminoMsg: AminoMsgBeginRedelegate = { type: "cosmos-sdk/MsgBeginRedelegate", @@ -690,6 +711,8 @@ describe("AminoTypes", () => { }); }); + // ibc + it("works for MsgTransfer", () => { const aminoMsg: AminoMsgTransfer = { type: "cosmos-sdk/MsgTransfer", @@ -760,6 +783,8 @@ describe("AminoTypes", () => { }); }); + // other + it("works for custom type url", () => { const aminoMsg = { type: "my-sdk/CustomType",