@exodus/solana-api 3.25.2 → 3.25.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/package.json +3 -3
- package/src/api.js +8 -5
- package/src/create-unsigned-tx-for-send.js +7 -2
- package/src/tx-send.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.25.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.25.1...@exodus/solana-api@3.25.4) (2025-11-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix: fee display for Solana sponsored transaction (#6980)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [3.25.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.25.1...@exodus/solana-api@3.25.3) (2025-11-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @exodus/solana-api
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [3.25.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.25.1...@exodus/solana-api@3.25.2) (2025-11-04)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @exodus/solana-api
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-api",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.4",
|
|
4
4
|
"description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Solana",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@exodus/fetch": "^1.7.3",
|
|
34
34
|
"@exodus/models": "^12.0.1",
|
|
35
35
|
"@exodus/simple-retry": "^0.0.6",
|
|
36
|
-
"@exodus/solana-lib": "^3.
|
|
36
|
+
"@exodus/solana-lib": "^3.17.0",
|
|
37
37
|
"@exodus/solana-meta": "^2.0.2",
|
|
38
38
|
"@exodus/timer": "^1.1.1",
|
|
39
39
|
"debug": "^4.1.1",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@exodus/assets-testing": "^1.0.0",
|
|
50
50
|
"@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "617a85fa96d12d0659e637c0c3fa3b6e5b8c0c9a",
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
|
|
55
55
|
},
|
package/src/api.js
CHANGED
|
@@ -367,7 +367,9 @@ export class Api {
|
|
|
367
367
|
postTokenBalances = postTokenBalances || []
|
|
368
368
|
innerInstructions = innerInstructions || []
|
|
369
369
|
|
|
370
|
-
let { instructions, accountKeys } = txDetails.transaction.message
|
|
370
|
+
let { instructions, accountKeys = [] } = txDetails.transaction.message
|
|
371
|
+
const feePayerPubkey = accountKeys[0].pubkey
|
|
372
|
+
const ownerIsFeePayer = feePayerPubkey === ownerAddress
|
|
371
373
|
const txId = txDetails.transaction.signatures[0]
|
|
372
374
|
|
|
373
375
|
const getUnparsedTx = () => {
|
|
@@ -571,7 +573,8 @@ export class Api {
|
|
|
571
573
|
to: isSending ? destination : ownerAddress,
|
|
572
574
|
amount,
|
|
573
575
|
token: tokenAccount,
|
|
574
|
-
fee
|
|
576
|
+
// Attribute fee only when owner is the actual fee payer
|
|
577
|
+
fee: isSending && ownerIsFeePayer ? fee : 0,
|
|
575
578
|
}
|
|
576
579
|
})
|
|
577
580
|
.filter((ix) => !!ix)
|
|
@@ -671,7 +674,7 @@ export class Api {
|
|
|
671
674
|
from: solanaTransferTx.source,
|
|
672
675
|
to: solanaTransferTx.destination,
|
|
673
676
|
amount: solanaTransferTx.lamports, // number
|
|
674
|
-
fee: isSending ? fee : 0,
|
|
677
|
+
fee: isSending && ownerIsFeePayer ? fee : 0,
|
|
675
678
|
data: solanaTransferTx.data,
|
|
676
679
|
}
|
|
677
680
|
}
|
|
@@ -695,7 +698,7 @@ export class Api {
|
|
|
695
698
|
innerInstructions,
|
|
696
699
|
tokenAccountsByOwner,
|
|
697
700
|
ownerAddress,
|
|
698
|
-
fee,
|
|
701
|
+
fee: ownerIsFeePayer ? fee : 0,
|
|
699
702
|
accountIndexes,
|
|
700
703
|
preTokenBalances,
|
|
701
704
|
postTokenBalances,
|
|
@@ -774,7 +777,7 @@ export class Api {
|
|
|
774
777
|
// QUESTION: How do I know what are my tokens addresses deterministically? It's not possible, gotta use tokenAccountsByOwner
|
|
775
778
|
|
|
776
779
|
return {
|
|
777
|
-
id:
|
|
780
|
+
id: txId,
|
|
778
781
|
slot: txDetails.slot,
|
|
779
782
|
error: !(txDetails.meta.err === null),
|
|
780
783
|
...tx,
|
|
@@ -286,9 +286,14 @@ export const extractTxLogData = async ({ unsignedTx, api }) => {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
const
|
|
289
|
+
const transfers = await parseTxBuffer(unsignedTx.txData.transactionBuffer, api)
|
|
290
|
+
const { method, from, to, amount } = transfers[0] // Use first transfer only
|
|
291
|
+
|
|
290
292
|
return {
|
|
291
|
-
|
|
293
|
+
method,
|
|
294
|
+
from,
|
|
295
|
+
to,
|
|
296
|
+
amount,
|
|
292
297
|
stakingParams: unsignedTx.txMeta.stakingParams,
|
|
293
298
|
usedFeePayer: unsignedTx.txMeta.usedFeePayer,
|
|
294
299
|
fee: unsignedTx.txMeta.fee,
|
package/src/tx-send.js
CHANGED
|
@@ -97,8 +97,8 @@ export const createAndBroadcastTXFactory = ({ api, assetClientInterface }) => {
|
|
|
97
97
|
txs: [tx],
|
|
98
98
|
})
|
|
99
99
|
|
|
100
|
-
if (isToken) {
|
|
101
|
-
// write tx entry in solana for token fee
|
|
100
|
+
if (isToken && !feeAmount.isZero) {
|
|
101
|
+
// write tx entry in solana for token fee (skip if fee is 0 for sponsored transactions)
|
|
102
102
|
const txForFee = {
|
|
103
103
|
txId,
|
|
104
104
|
confirmations: 0,
|