Skip to content

Commit

Permalink
bump and minor fix (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m authored Jan 20, 2025
1 parent ea66daf commit 6845e29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/express-relay-js",
"version": "0.17.3",
"version": "0.18.0",
"description": "Utilities for interacting with the express relay protocol",
"homepage": "https://github.com/pyth-network/per/tree/main/sdk/js",
"author": "Douro Labs",
Expand Down
8 changes: 7 additions & 1 deletion sdk/js/src/svm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,17 @@ export async function constructSwapBid(
router,
} = extractSwapInfo(swapOpportunity);
const tokenAccountsToCreate = [
{ owner: router, mint: mintFee, program: feeTokenProgram },
{ owner: relayerSigner, mint: mintFee, program: feeTokenProgram },
{ owner: expressRelayMetadata, mint: mintFee, program: feeTokenProgram },
{ owner: trader, mint: outputToken, program: outputTokenProgram },
];
if (swapOpportunity.referralFeeBps > 0) {
tokenAccountsToCreate.push({
owner: router,
mint: mintFee,
program: feeTokenProgram,
});
}
for (const account of tokenAccountsToCreate) {
tx.instructions.push(
createAtaIdempotentInstruction(
Expand Down

0 comments on commit 6845e29

Please sign in to comment.