@exodus/solana-lib 1.2.21 → 1.2.22
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/package.json +2 -2
- package/src/transaction.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22",
|
|
4
4
|
"description": "Exodus internal Solana low-level library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"lodash": "^4.17.11",
|
|
24
24
|
"tweetnacl": "^1.0.3"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "b0b12a6e226a8b1780cc6191f75b50822af3b71d"
|
|
27
27
|
}
|
package/src/transaction.js
CHANGED
|
@@ -56,7 +56,8 @@ class Tx {
|
|
|
56
56
|
|
|
57
57
|
if (tokenName && !tokenMintAddress) {
|
|
58
58
|
const token = TOKENS.find(({ name }) => name === tokenName)
|
|
59
|
-
|
|
59
|
+
assert(token, `token with tokenName ${tokenName} not found in tokens list`)
|
|
60
|
+
tokenMintAddress = token.mintAddress
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
this.txObj = {
|
|
@@ -107,7 +108,7 @@ class Tx {
|
|
|
107
108
|
})
|
|
108
109
|
// const isUnknown = destinationAddressType === null
|
|
109
110
|
// if (isUnknown) throw new Error('Destination SOL balance cannot be zero (address not active)') // cannot initialize without knowing the owner
|
|
110
|
-
const isSOLaddress =
|
|
111
|
+
const isSOLaddress = ['solana', null].includes(destinationAddressType)
|
|
111
112
|
// crete account instruction
|
|
112
113
|
if (isSOLaddress && !isAssociatedTokenAccountActive)
|
|
113
114
|
this.transaction.add(createAssociatedTokenAccount(from, tokenMintAddress, to))
|