Beautify Code
This commit is contained in:
parent
54610c9a49
commit
069a298e44
@ -13,9 +13,7 @@ describe("AminoTypes", () => {
|
||||
toAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
amount: coins(1234, "ucosm"),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createBankAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createBankAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.bank.v1beta1.MsgSend",
|
||||
value: msg,
|
||||
@ -42,9 +40,7 @@ describe("AminoTypes", () => {
|
||||
{ address: "cosmos142u9fgcjdlycfcez3lw8x6x5h7rfjlnfhpw2lx", coins: coins(912, "ucosm") },
|
||||
],
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createBankAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createBankAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.bank.v1beta1.MsgMultiSend",
|
||||
value: msg,
|
||||
@ -75,7 +71,7 @@ describe("AminoTypes", () => {
|
||||
amount: coins(1234, "ucosm"),
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createBankAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createBankAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgSend = {
|
||||
fromAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
toAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
@ -101,7 +97,7 @@ describe("AminoTypes", () => {
|
||||
],
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createBankAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createBankAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgMultiSend = {
|
||||
inputs: [
|
||||
{ address: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6", coins: coins(1234, "ucosm") },
|
||||
|
||||
@ -23,9 +23,7 @@ describe("AminoTypes", () => {
|
||||
amount: coins(1234, "ucosm"),
|
||||
depositor: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createDistributionAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createDistributionAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
|
||||
value: msg,
|
||||
@ -45,9 +43,7 @@ describe("AminoTypes", () => {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
withdrawAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createDistributionAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createDistributionAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
|
||||
value: msg,
|
||||
@ -67,9 +63,7 @@ describe("AminoTypes", () => {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createDistributionAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createDistributionAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
|
||||
value: msg,
|
||||
@ -88,9 +82,7 @@ describe("AminoTypes", () => {
|
||||
const msg: MsgWithdrawValidatorCommission = {
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createDistributionAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createDistributionAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
|
||||
value: msg,
|
||||
|
||||
@ -19,9 +19,7 @@ describe("AminoTypes", () => {
|
||||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
proposalId: Long.fromNumber(5),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createGovAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createGovAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.gov.v1beta1.MsgDeposit",
|
||||
value: msg,
|
||||
@ -49,9 +47,7 @@ describe("AminoTypes", () => {
|
||||
}).finish(),
|
||||
},
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createGovAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createGovAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.gov.v1beta1.MsgSubmitProposal",
|
||||
value: msg,
|
||||
@ -79,9 +75,7 @@ describe("AminoTypes", () => {
|
||||
proposalId: Long.fromNumber(5),
|
||||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createGovAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createGovAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.gov.v1beta1.MsgVote",
|
||||
value: msg,
|
||||
@ -107,7 +101,7 @@ describe("AminoTypes", () => {
|
||||
proposal_id: "5",
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createGovAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createGovAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgDeposit = {
|
||||
amount: [{ amount: "12300000", denom: "ustake" }],
|
||||
depositor: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
@ -134,7 +128,7 @@ describe("AminoTypes", () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createGovAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createGovAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgSubmitProposal = {
|
||||
initialDeposit: [{ amount: "12300000", denom: "ustake" }],
|
||||
proposer: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
@ -161,7 +155,7 @@ describe("AminoTypes", () => {
|
||||
voter: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k",
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createGovAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createGovAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgVote = {
|
||||
option: VoteOption.VOTE_OPTION_NO_WITH_VETO,
|
||||
proposalId: Long.fromNumber(5),
|
||||
|
||||
@ -21,9 +21,7 @@ describe("AminoTypes", () => {
|
||||
},
|
||||
timeoutTimestamp: Long.fromString("789", true),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createIbcAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createIbcAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
||||
value: msg,
|
||||
@ -59,9 +57,7 @@ describe("AminoTypes", () => {
|
||||
},
|
||||
timeoutTimestamp: Long.UZERO,
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createIbcAminoConverters(),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createIbcAminoConverters());
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
||||
value: msg,
|
||||
@ -94,7 +90,7 @@ describe("AminoTypes", () => {
|
||||
timeoutHeight: undefined,
|
||||
timeoutTimestamp: Long.UZERO,
|
||||
};
|
||||
const aminoMsg = new AminoTypes({ ...createIbcAminoConverters() }).toAmino({
|
||||
const aminoMsg = new AminoTypes(createIbcAminoConverters()).toAmino({
|
||||
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
||||
value: msg,
|
||||
});
|
||||
@ -130,7 +126,7 @@ describe("AminoTypes", () => {
|
||||
timeout_timestamp: "789",
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createIbcAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgTransfer = {
|
||||
sourcePort: "testport",
|
||||
sourceChannel: "testchannel",
|
||||
@ -165,7 +161,7 @@ describe("AminoTypes", () => {
|
||||
// timeout_timestamp omitted
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createIbcAminoConverters() }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createIbcAminoConverters()).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgTransfer = {
|
||||
sourcePort: "testport",
|
||||
sourceChannel: "testchannel",
|
||||
|
||||
@ -29,9 +29,7 @@ describe("AminoTypes", () => {
|
||||
validatorDstAddress: "cosmos1xy4yqngt0nlkdcenxymg8tenrghmek4nmqm28k",
|
||||
amount: coin(1234, "ucosm"),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createStakingAminoConverters("cosmos"),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createStakingAminoConverters("cosmos"));
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.staking.v1beta1.MsgBeginRedelegate",
|
||||
value: msg,
|
||||
@ -71,9 +69,7 @@ describe("AminoTypes", () => {
|
||||
},
|
||||
value: coin(1234, "ucosm"),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createStakingAminoConverters("cosmos"),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createStakingAminoConverters("cosmos"));
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.staking.v1beta1.MsgCreateValidator",
|
||||
value: msg,
|
||||
@ -112,9 +108,7 @@ describe("AminoTypes", () => {
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
amount: coin(1234, "ucosm"),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createStakingAminoConverters("cosmos"),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createStakingAminoConverters("cosmos"));
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.staking.v1beta1.MsgDelegate",
|
||||
value: msg,
|
||||
@ -143,9 +137,7 @@ describe("AminoTypes", () => {
|
||||
minSelfDelegation: "123",
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createStakingAminoConverters("cosmos"),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createStakingAminoConverters("cosmos"));
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.staking.v1beta1.MsgEditValidator",
|
||||
value: msg,
|
||||
@ -174,9 +166,7 @@ describe("AminoTypes", () => {
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
amount: coin(1234, "ucosm"),
|
||||
};
|
||||
const aminoTypes = new AminoTypes({
|
||||
...createStakingAminoConverters("cosmos"),
|
||||
});
|
||||
const aminoTypes = new AminoTypes(createStakingAminoConverters("cosmos"));
|
||||
const aminoMsg = aminoTypes.toAmino({
|
||||
typeUrl: "/cosmos.staking.v1beta1.MsgUndelegate",
|
||||
value: msg,
|
||||
@ -203,7 +193,7 @@ describe("AminoTypes", () => {
|
||||
amount: coin(1234, "ucosm"),
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createStakingAminoConverters("cosmos") }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createStakingAminoConverters("cosmos")).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgBeginRedelegate = {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
validatorSrcAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
@ -242,7 +232,7 @@ describe("AminoTypes", () => {
|
||||
value: coin(1234, "ucosm"),
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createStakingAminoConverters("cosmos") }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createStakingAminoConverters("cosmos")).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgCreateValidator = {
|
||||
description: {
|
||||
moniker: "validator",
|
||||
@ -280,7 +270,7 @@ describe("AminoTypes", () => {
|
||||
amount: coin(1234, "ucosm"),
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createStakingAminoConverters("cosmos") }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createStakingAminoConverters("cosmos")).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgDelegate = {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
@ -308,7 +298,7 @@ describe("AminoTypes", () => {
|
||||
validator_address: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createStakingAminoConverters("cosmos") }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createStakingAminoConverters("cosmos")).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgEditValidator = {
|
||||
description: {
|
||||
moniker: "validator",
|
||||
@ -336,7 +326,7 @@ describe("AminoTypes", () => {
|
||||
amount: coin(1234, "ucosm"),
|
||||
},
|
||||
};
|
||||
const msg = new AminoTypes({ ...createStakingAminoConverters("cosmos") }).fromAmino(aminoMsg);
|
||||
const msg = new AminoTypes(createStakingAminoConverters("cosmos")).fromAmino(aminoMsg);
|
||||
const expectedValue: MsgUndelegate = {
|
||||
delegatorAddress: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
validatorAddress: "cosmos10dyr9899g6t0pelew4nvf4j5c3jcgv0r73qga5",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user