Make ERC20s non-optional in parseMsg
This commit is contained in:
parent
5495828a6c
commit
318dc6f32c
@ -158,7 +158,9 @@ describe("decode", () => {
|
||||
],
|
||||
},
|
||||
};
|
||||
expect(parseMsg(msg, defaultMemo, testdata.chainId, defaultTokens)).toEqual(defaultSendTransaction);
|
||||
expect(parseMsg(msg, defaultMemo, testdata.chainId, defaultTokens, defaultErc20Tokens)).toEqual(
|
||||
defaultSendTransaction,
|
||||
);
|
||||
});
|
||||
|
||||
it("works for ERC20 send transaction", () => {
|
||||
|
||||
@ -77,7 +77,7 @@ export function parseMsg(
|
||||
memo: string | undefined,
|
||||
chainId: ChainId,
|
||||
tokens: BankTokens,
|
||||
erc20Tokens: readonly Erc20Token[] = [],
|
||||
erc20Tokens: readonly Erc20Token[],
|
||||
): UnsignedTransaction {
|
||||
if (types.isMsgSend(msg)) {
|
||||
if (msg.value.amount.length !== 1) {
|
||||
|
||||
2
packages/bcp/types/decode.d.ts
vendored
2
packages/bcp/types/decode.d.ts
vendored
@ -24,7 +24,7 @@ export declare function parseMsg(
|
||||
memo: string | undefined,
|
||||
chainId: ChainId,
|
||||
tokens: BankTokens,
|
||||
erc20Tokens?: readonly Erc20Token[],
|
||||
erc20Tokens: readonly Erc20Token[],
|
||||
): UnsignedTransaction;
|
||||
export declare function parseFee(fee: types.StdFee, tokens: BankTokens): Fee;
|
||||
export declare function parseUnsignedTx(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user