Skip to content

Commit

Permalink
fix: updated loss_tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
Vovke committed Dec 12, 2024
1 parent b62cd9f commit a399c5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/chain/payout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub async fn payout(
let block = block_hash(&client, None).await?; // TODO should retry instead
let block_number = current_block_number(&client, &chain.metadata, &block).await?;
let balance = order.balance(&client, &chain, &block).await?; // TODO same
let loss_tolerance = 10000; // TODO: replace with multiple of existential
let loss_tolerance = 20000; // TODO: replace with multiple of existential
// TODO: add upper limit for transactions that would require manual intervention
// just because it was found to be needed with non-crypto trade, who knows why?
let currency = chain
Expand Down
2 changes: 2 additions & 0 deletions tests/kalatori-api-test-suite/tests/order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ describe('Order Endpoint Blackbox Tests', () => {
expect(forcedOrderDetails.payment_status).toBe('pending');
expect(forcedOrderDetails.withdrawal_status).toBe('forced');

await new Promise(resolve => setTimeout(resolve, 5000));

const paymentAccountDotBalance = await getDotBalance(orderDetails.currency.rpc_url, paymentAccount);
expect(reverseDecimals(paymentAccountDotBalance, 10)).toBe(0);
}, 100000);
Expand Down

0 comments on commit a399c5c

Please sign in to comment.