@exodus/solana-api 2.5.27 → 2.5.28

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/api.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "2.5.27",
3
+ "version": "2.5.28",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -23,8 +23,8 @@
23
23
  "@exodus/models": "^10.1.0",
24
24
  "@exodus/nfts-core": "^0.5.0",
25
25
  "@exodus/simple-retry": "^0.0.6",
26
- "@exodus/solana-lib": "^1.7.4",
27
- "@exodus/solana-meta": "^1.0.5",
26
+ "@exodus/solana-lib": "^1.7.5",
27
+ "@exodus/solana-meta": "^1.0.7",
28
28
  "bn.js": "^4.11.0",
29
29
  "debug": "^4.1.1",
30
30
  "lodash": "^4.17.11",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@exodus/assets-testing": "file:../../../__testing__"
36
36
  },
37
- "gitHead": "9e93c3846854f6c64b0bdd5abe103ec5ff980596"
37
+ "gitHead": "e46dbfdf19c725e5e7d4aa98a9e0eac913c44ed2"
38
38
  }
package/src/api.js CHANGED
@@ -340,10 +340,14 @@ export class Api {
340
340
  }, [])
341
341
  .map((ix) => {
342
342
  const type = lodash.get(ix, 'parsed.type')
343
- const isTransferTx = ix.parsed && ix.program === 'spl-token' && type === 'transfer'
343
+ const isTransferTx =
344
+ ix.parsed && ix.program === 'spl-token' && ['transfer', 'transferChecked'].includes(type)
344
345
  const source = lodash.get(ix, 'parsed.info.source')
345
346
  const destination = lodash.get(ix, 'parsed.info.destination')
346
- const amount = Number(lodash.get(ix, 'parsed.info.amount', 0))
347
+ const amount = Number(
348
+ lodash.get(ix, 'parsed.info.amount', 0) ||
349
+ lodash.get(ix, 'parsed.info.tokenAmount.amount', 0)
350
+ )
347
351
 
348
352
  const tokenAccount = tokenAccountsByOwner.find(({ tokenAccountAddress }) => {
349
353
  return [source, destination].includes(tokenAccountAddress)