Skip to content

Commit

Permalink
chore(e2e): add verify amount with more than 6 decimal test case
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaC817 committed Mar 3, 2023
1 parent 15e8177 commit cf2a11c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/server/test-i9n/defichain/verify.i9n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,18 @@ describe('DeFiChain Verify fund Testing', () => {
expect(response).toStrictEqual({ isValid: false, statusCode: CustomErrorCodes.AmountNotValid });
});

it('should throw error if amount has more than 6 decimal place', async () => {
const response = await verify({
amount: '3.1234567',
symbol: 'BTC',
address: localAddress,
ethReceiverAddress: ethWalletAddress,
tokenAddress: mwbtcContract.address,
});

expect(response).toStrictEqual({ isValid: false, statusCode: CustomErrorCodes.AmountNotValid });
});

it('should verify fund in the wallet address and top up UTXO', async () => {
const hotWallet = whaleWalletProvider.getHotWallet();
const hotWalletAddress = await hotWallet.getAddress();
Expand Down

0 comments on commit cf2a11c

Please sign in to comment.