Skip to content

Commit

Permalink
Update InterchainTokenService.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ahramy committed Nov 5, 2024
1 parent 2d32939 commit f150ff1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/InterchainTokenService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2780,14 +2780,14 @@ describe('Interchain Token Service', () => {
const tokenFlowLimit = await service.flowLimit(tokenId);
expect(tokenFlowLimit).to.eq(flowLimit);

let flowIn = await service.flowInAmount(tokenId);
let flowOut = await service.flowOutAmount(tokenId);
const flowIn = await service.flowInAmount(tokenId);
const flowOut = await service.flowOutAmount(tokenId);

expect(flowIn).to.eq(sendAmount);
expect(flowOut).to.eq(sendAmount);

let newFlowLimit = MaxUint256;
let newSendAmount = 1;
const newFlowLimit = MaxUint256;
const newSendAmount = 1;

await tokenManager.setFlowLimit(newFlowLimit).then((tx) => tx.wait);

Expand All @@ -2811,18 +2811,18 @@ describe('Interchain Token Service', () => {
});

it('Should revert if the flow addition overflows', async () => {
let newFlowLimit = MaxUint256;
let newSendAmount = MaxUint256;

const tokenFlowLimit = await service.flowLimit(tokenId);
expect(tokenFlowLimit).to.eq(MaxUint256);

let flowIn = await service.flowInAmount(tokenId);
let flowOut = await service.flowOutAmount(tokenId);
const flowIn = await service.flowInAmount(tokenId);
const flowOut = await service.flowOutAmount(tokenId);

expect(flowIn).to.eq(sendAmount);
expect(flowOut).to.eq(sendAmount);

const newFlowLimit = MaxUint256;
const newSendAmount = MaxUint256;

await tokenManager.setFlowLimit(newFlowLimit).then((tx) => tx.wait);

const errorSignatureHash = id('FlowAdditionOverflow(uint256,uint256,address)');
Expand Down

0 comments on commit f150ff1

Please sign in to comment.