From 1a3ea5282a7e5fa6b1e0c6cc1cbd87082052dedc Mon Sep 17 00:00:00 2001 From: Nagaprasadvr Date: Mon, 22 Apr 2024 12:14:41 +0530 Subject: [PATCH] add changeset --- packages/cli/CHANGELOG.md | 8 ++++++++ packages/cli/package.json | 4 ++-- packages/js/CHANGELOG.md | 6 ++++++ packages/js/package.json | 2 +- packages/js/src/constants.ts | 6 +++--- packages/js/src/utils/TransactionBuilder.ts | 4 ++-- 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 78eeb3b0d..014765b50 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,13 @@ # @convergence-rfq/cli +## 6.6.4 + +### Patch Changes + +- Update Tx priortiy fees +- Updated dependencies + - @convergence-rfq/sdk@6.6.4 + ## 6.6.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 83a2ca0d1..5b8a937ee 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@convergence-rfq/cli", "description": "Official Convergence CLI", - "version": "6.6.3", + "version": "6.6.4", "license": "MIT", "publishConfig": { "access": "public" @@ -47,7 +47,7 @@ "cli": "ts-node src/index.ts" }, "dependencies": { - "@convergence-rfq/sdk": "6.6.3", + "@convergence-rfq/sdk": "6.6.4", "@solana/web3.js": "^1.87.6", "@types/cookie": "^0.5.1", "commander": "^10.0.0" diff --git a/packages/js/CHANGELOG.md b/packages/js/CHANGELOG.md index b76e10019..d40f85730 100644 --- a/packages/js/CHANGELOG.md +++ b/packages/js/CHANGELOG.md @@ -1,5 +1,11 @@ # @convergence-rfq/sdk +## 6.6.4 + +### Patch Changes + +- Update Tx priortiy fees + ## 6.6.3 ### Patch Changes diff --git a/packages/js/package.json b/packages/js/package.json index dd3ff2ba2..9779adb01 100644 --- a/packages/js/package.json +++ b/packages/js/package.json @@ -1,7 +1,7 @@ { "name": "@convergence-rfq/sdk", "description": "Official Convergence RFQ SDK", - "version": "6.6.3", + "version": "6.6.4", "license": "MIT", "publishConfig": { "access": "public" diff --git a/packages/js/src/constants.ts b/packages/js/src/constants.ts index 066a98d65..3ba31d912 100644 --- a/packages/js/src/constants.ts +++ b/packages/js/src/constants.ts @@ -1,8 +1,8 @@ export const TRANSACTION_PRIORITY_FEE_MAP = { none: 0, - normal: 1, - high: 10, - turbo: 100, + normal: 5_000, + high: 15_000, + turbo: 25_000, }; export const HXRO_COLLATERAL_LOG_INDEX = 7; diff --git a/packages/js/src/utils/TransactionBuilder.ts b/packages/js/src/utils/TransactionBuilder.ts index 9f3894953..a43f2446c 100644 --- a/packages/js/src/utils/TransactionBuilder.ts +++ b/packages/js/src/utils/TransactionBuilder.ts @@ -300,13 +300,13 @@ export class TransactionBuilder { if (!convergence.transactionPriority) { return this; } - const txPriorityInMicroLamports = + const txPriorityInLamports = typeof convergence.transactionPriority === 'number' ? convergence.transactionPriority : TRANSACTION_PRIORITY_FEE_MAP[convergence.transactionPriority]; return this.add({ instruction: ComputeBudgetProgram.setComputeUnitPrice({ - microLamports: txPriorityInMicroLamports, + microLamports: txPriorityInLamports * Math.pow(10, 6), }), signers: [], });