Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Mar 25, 2024
1 parent 3756cda commit 244aef9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/swap/src/providers/rango/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ class Rango extends ProviderClass {
!f.token.address &&
f.expenseType === "FROM_SOURCE_WALLET" &&
f.name !== "Network Fee"
)
) {
additionalNativeFees = additionalNativeFees.add(toBN(f.amount));
}
});
return {
transactions,
Expand Down
2 changes: 1 addition & 1 deletion packages/swap/tests/changelly.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Changelly Provider", () => {
expect(quote?.quote.meta.walletIdentifier).to.be.eq(
WalletIdentifier.enkrypt
);
expect(quote?.fromTokenAmount.toString()).to.be.eq(amount.toString());
expect(quote?.fromTokenAmount.gte(amount)).to.be.eq(true);
expect(quote?.toTokenAmount.gtn(0)).to.be.eq(true);
const swap = await changelly.getSwap(quote!.quote);

Expand Down
2 changes: 1 addition & 1 deletion packages/swap/tests/rango.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe("Rango Provider", () => {
);
expect(quote?.fromTokenAmount.toString()).to.be.eq(amount.toString());
expect(quote?.toTokenAmount.gtn(0)).to.be.eq(true);
expect(quote?.additionalNativeFees.gtn(0)).to.be.eq(true);
expect(quote?.additionalNativeFees.eqn(0)).to.be.eq(true);
const swap = await rango.getSwap(quote!.quote);
expect(swap?.transactions.length).to.be.eq(1);
}).timeout(25000);
Expand Down

1 comment on commit 244aef9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.