Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Updates tests for invalid module name length in lockedBalances
Browse files Browse the repository at this point in the history
  • Loading branch information
has5aan committed Sep 21, 2023
1 parent dc17200 commit 7aa3b9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions framework/test/unit/modules/token/cc_method.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
CCM_STATUS_OK,
CHAIN_ID_LENGTH,
CROSS_CHAIN_COMMAND_NAME_TRANSFER,
MIN_MODULE_NAME_LENGTH,
MAX_MODULE_NAME_LENGTH,
TokenEventResult,
} from '../../../../src/modules/token/constants';
Expand Down Expand Up @@ -708,8 +709,8 @@ describe('TokenInteroperableMethod', () => {
storeKey: Buffer.concat([defaultAddress, defaultTokenID]),
substorePrefix: userStore.subStorePrefix,
storeValue: codec.encode(userStoreSchema, {
availableBalance: null,
lockedBalances: [{ module: ''.repeat(MAX_MODULE_NAME_LENGTH - 1), amount: BigInt(10) }],
availableBalance: defaultAccount.availableBalance,
lockedBalances: [{ module: ''.repeat(MIN_MODULE_NAME_LENGTH - 1), amount: BigInt(10) }],
}),
terminatedChainID: sendingChainID,
}),
Expand All @@ -727,7 +728,7 @@ describe('TokenInteroperableMethod', () => {
storeKey: Buffer.concat([defaultAddress, defaultTokenID]),
substorePrefix: userStore.subStorePrefix,
storeValue: codec.encode(userStoreSchema, {
availableBalance: null,
availableBalance: defaultAccount.availableBalance,
lockedBalances: [{ module: ''.repeat(MAX_MODULE_NAME_LENGTH + 1), amount: BigInt(10) }],
}),
terminatedChainID: sendingChainID,
Expand Down

0 comments on commit 7aa3b9f

Please sign in to comment.