Skip to content

Commit

Permalink
Merge pull request #295 from convergence-rfq/dev-change-tx-priority-a…
Browse files Browse the repository at this point in the history
…nd-rpc

Update Tx Priority fee config
  • Loading branch information
pindaroso authored Apr 22, 2024
2 parents 4b29686 + 1a3ea52 commit 60ba2a0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
8 changes: 8 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions packages/js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @convergence-rfq/sdk

## 6.6.4

### Patch Changes

- Update Tx priortiy fees

## 6.6.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/js/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions packages/js/src/constants.ts
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 2 additions & 2 deletions packages/js/src/utils/TransactionBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ export class TransactionBuilder<C extends object = object> {
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: [],
});
Expand Down

0 comments on commit 60ba2a0

Please sign in to comment.