Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/upload-art…
Browse files Browse the repository at this point in the history
…ifact-4
  • Loading branch information
Vovke authored Jan 2, 2025
2 parents c2c9cf0 + e7c6e8d commit 9d09b80
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/kalatori-api-test-suite/tests/order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('Order Endpoint Blackbox Tests', () => {
expect(repaidOrderDetails.withdrawal_status).toBe('completed');

const paymentAccountUsdcBalance = await getAssetBalance(orderDetails.currency.rpc_url, paymentAccount, orderDetails.currency.asset_id);
expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBe(0);
expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBeLessThan(0.1);
}, 50000);

it('should not automatically withdraw DOT order until fully repaid', async () => {
Expand Down Expand Up @@ -379,7 +379,7 @@ describe('Order Endpoint Blackbox Tests', () => {
expect(repaidOrderDetails.withdrawal_status).toBe('completed');

const paymentAccountUsdcBalance = await getAssetBalance(orderDetails.currency.rpc_url, paymentAccount, orderDetails.currency.asset_id);
expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBe(0);
expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBeLessThan(0.1);;
}, 100000);

it('should not update order if received payment in wrong currency', async () => {
Expand Down Expand Up @@ -477,7 +477,8 @@ describe('Order Endpoint Blackbox Tests', () => {
expect(forcedOrderDetails.withdrawal_status).toBe('forced');

const paymentAccountUsdcBalance = await getAssetBalance(orderDetails.currency.rpc_url, paymentAccount, orderDetails.currency.asset_id);
expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBe(0);

expect(reverseDecimals(paymentAccountUsdcBalance, 6)).toBeLessThan(0.1);
}, 100000);

it('should return 404 for non-existing order on force withdrawal', async () => {
Expand Down

0 comments on commit 9d09b80

Please sign in to comment.