@exodus/solana-api 3.25.3 → 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 CHANGED
@@ -3,6 +3,16 @@
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
+
6
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)
7
17
 
8
18
  **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",
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",
@@ -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": "6a39e3cdbf3bf1849d6d4aae8e935588332d92ac",
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: isSending ? fee : 0,
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: txDetails.transaction.signatures[0],
780
+ id: txId,
778
781
  slot: txDetails.slot,
779
782
  error: !(txDetails.meta.err === null),
780
783
  ...tx,
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,