@exodus/solana-api 3.13.1 → 3.13.3

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,30 @@
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.13.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.2...@exodus/solana-api@3.13.3) (2025-01-17)
7
+
8
+ **Note:** Version bump only for package @exodus/solana-api
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.13.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.1...@exodus/solana-api@3.13.2) (2025-01-09)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+
20
+ * fix: solana missing txId of dexTxs (#4818)
21
+
22
+
23
+ ### License
24
+
25
+
26
+ * license: re-license under MIT license (#4814)
27
+
28
+
29
+
6
30
  ## [3.13.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-api@3.13.0...@exodus/solana-api@3.13.1) (2025-01-09)
7
31
 
8
32
 
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2024 Exodus Movement, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "3.13.1",
3
+ "version": "3.13.3",
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",
@@ -12,7 +12,7 @@
12
12
  "!src/**/__tests__"
13
13
  ],
14
14
  "author": "Exodus Movement, Inc.",
15
- "license": "ISC",
15
+ "license": "MIT",
16
16
  "publishConfig": {
17
17
  "access": "public"
18
18
  },
@@ -47,7 +47,7 @@
47
47
  "@exodus/assets-testing": "^1.0.0",
48
48
  "@exodus/solana-web3.js": "^1.63.1-exodus.9-rc3"
49
49
  },
50
- "gitHead": "8593d378a2c8054dea5d94dac3bf96b124842903",
50
+ "gitHead": "ce5cac014bcbb982ac6680145228c21865deb9f8",
51
51
  "bugs": {
52
52
  "url": "https://github.com/ExodusMovement/assets/issues?q=is%3Aissue+is%3Aopen+label%3Asolana-api"
53
53
  },
package/src/api.js CHANGED
@@ -311,6 +311,7 @@ export class Api {
311
311
  innerInstructions = innerInstructions || []
312
312
 
313
313
  let { instructions, accountKeys } = txDetails.transaction.message
314
+ const txId = txDetails.transaction.signatures[0]
314
315
 
315
316
  const getUnparsedTx = () => {
316
317
  const ownerIndex = accountKeys.findIndex((accountKey) => accountKey.pubkey === ownerAddress)
@@ -374,7 +375,7 @@ export class Api {
374
375
  const { from, to, owner } = match
375
376
 
376
377
  return {
377
- id: txDetails.transaction.signatures[0],
378
+ id: txId,
378
379
  slot: txDetails.slot,
379
380
  owner,
380
381
  from,
@@ -448,6 +449,8 @@ export class Api {
448
449
 
449
450
  // owner if it's a send tx
450
451
  return {
452
+ id: txId,
453
+ slot: txDetails.slot,
451
454
  owner: isSending ? ownerAddress : null,
452
455
  from: isSending ? ownerAddress : source,
453
456
  to: isSending ? destination : ownerAddress,
@@ -538,7 +541,7 @@ export class Api {
538
541
  if (tokenTxs.length > 0) {
539
542
  // found spl-token simple transfer/transferChecked instruction
540
543
  tx.tokenTxs = tokenTxs.map((tx) => ({
541
- id: txDetails.transaction.signatures[0],
544
+ id: txId,
542
545
  slot: txDetails.slot,
543
546
  ...tx,
544
547
  }))
@@ -46,6 +46,9 @@ export const getBalancesFactory =
46
46
 
47
47
  const spendable = balanceWithoutStaking.sub(walletReserve).sub(networkReserve).clampLowerZero()
48
48
 
49
+ // leave enough amount for accountReserve if it's not reserved already
50
+ const stakeable = walletReserve.isZero ? spendable.sub(accountReserve) : spendable
51
+
49
52
  const staked = locked
50
53
  const unstaking = pending
51
54
 
@@ -56,6 +59,7 @@ export const getBalancesFactory =
56
59
  // new
57
60
  total,
58
61
  spendable,
62
+ stakeable,
59
63
  staked,
60
64
  unstaking,
61
65
  networkReserve,