Skip to content

Commit

Permalink
fix: sdk to not swallow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
guibescos committed Dec 17, 2024
1 parent 91a00a9 commit 968b6dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sdk/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,12 @@ export class Client {
encoded_order,
Order.discriminator.length
);
const remainingOutputAmount = anchor.BN.max(
const remainingOutputAmount =
opportunity.order.state.expectedOutputAmount.sub(
opportunity.order.state.filledOutputAmount
),
new anchor.BN(0)
);
);
// new anchor.BN(0)

body = {
chain_id: opportunity.chainId,
version: "v1" as const,
Expand Down Expand Up @@ -434,7 +434,7 @@ export class Client {
});
if (response.error) {
throw ClientError.newHttpError(
response.error.error,
response.error.toString(),
response.response.status
);
}
Expand Down

0 comments on commit 968b6dd

Please sign in to comment.