@exodus/solana-api 1.2.1 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/index.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-api",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Exodus internal Solana asset API wrapper",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -13,9 +13,9 @@
13
13
  "access": "restricted"
14
14
  },
15
15
  "dependencies": {
16
- "@exodus/solana-lib": "^1.2.1",
17
- "@exodus/solana-web3.js": "^0.87.1-exodus3",
16
+ "@exodus/solana-lib": "^1.2.3",
17
+ "@exodus/solana-web3.js": "^0.87.1-exodus4",
18
18
  "lodash": "^4.17.11"
19
19
  },
20
- "gitHead": "51f71e5bcebd886116bf433c8fe79859a185d16c"
20
+ "gitHead": "5be453e5b6c47cf82b8c80a83e8a4bebbb487a2e"
21
21
  }
package/src/index.js CHANGED
@@ -203,9 +203,11 @@ class Api {
203
203
  for (let entry of accountsList) {
204
204
  const { pubkey, account } = entry
205
205
 
206
- const token = tokens.find(
207
- ({ mintAddress }) => mintAddress === lodash.get(account, 'data.parsed.info.mint')
208
- )
206
+ const mint = lodash.get(account, 'data.parsed.info.mint')
207
+ const token = tokens.find(({ mintAddress }) => mintAddress === mint) || {
208
+ tokenName: 'unknown',
209
+ tokenSymbol: 'UNKNOWN',
210
+ }
209
211
  const balance = lodash.get(account, 'data.parsed.info.tokenAmount.amount', '0')
210
212
  tokenAccounts.push({
211
213
  tokenAccountAddress: pubkey,