Skip to content

Commit

Permalink
Fix initFee fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
adambor committed Feb 7, 2025
1 parent 41143ab commit 0702e17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/solana/swaps/modules/SwapInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ class SwapInit extends SolanaSwapModule_1.SolanaSwapModule {
const [rawFee, initAta] = yield Promise.all([
this.getRawInitFee(swapData, feeRate),
swapData != null && swapData.payOut ?
this.root.Tokens.getATAOrNull((0, spl_token_1.getAssociatedTokenAddressSync)(swapData.claimer, swapData.token)).then(acc => acc == null) :
this.root.Tokens.getATAOrNull((0, spl_token_1.getAssociatedTokenAddressSync)(swapData.token, swapData.claimer)).then(acc => acc == null) :
Promise.resolve(null)
]);
let resultingFee = new BN(this.root.ESCROW_STATE_RENT_EXEMPT).add(rawFee);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atomiqlabs/chain-solana",
"version": "7.3.7",
"version": "7.3.8",
"description": "Solana specific base implementation",
"main": "./dist/index.js",
"types:": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/solana/swaps/modules/SwapInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ export class SwapInit extends SolanaSwapModule {
const [rawFee, initAta] = await Promise.all([
this.getRawInitFee(swapData, feeRate),
swapData!=null && swapData.payOut ?
this.root.Tokens.getATAOrNull(getAssociatedTokenAddressSync(swapData.claimer, swapData.token)).then(acc => acc==null) :
this.root.Tokens.getATAOrNull(getAssociatedTokenAddressSync(swapData.token, swapData.claimer)).then(acc => acc==null) :
Promise.resolve<null>(null)
]);

Expand Down

0 comments on commit 0702e17

Please sign in to comment.