Skip to content

Commit

Permalink
fix flaky lp_api bouncer check (#4204)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-chainflip authored Nov 6, 2023
1 parent bfe0748 commit fe03a30
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bouncer/shared/lp_api_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ async function testRangeOrder() {
]);

assert(mintRangeOrder.length >= 1, `Empty mint range order result`);
assert(
mintRangeOrder[0].size_change.increase.liquidity > 0,
`Expected mint of range order to increase liquidity`,
);
assert(
mintRangeOrder[0].liquidity_total > 0,
`Expected range order to have liquidity after mint`,
Expand All @@ -205,7 +201,11 @@ async function testRangeOrder() {
let matchUpdate = false;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
updateRangeOrder.forEach((order: any) => {
if (order.size_change.increase.liquidity > 0 && order.liquidity_total > 0) {
if (
order.size_change.increase !== null &&
order.size_change.increase.liquidity > 0 &&
order.liquidity_total > 0
) {
matchUpdate = true;
}
});
Expand Down

0 comments on commit fe03a30

Please sign in to comment.