@exodus/ethereum-lib 1.0.2 → 1.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@exodus/assets": "8.0.x"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "6bd81c072e44b09c85e19c95deb8246cb9a323a0"
|
|
24
24
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import ethUtil from 'ethereumjs-util'
|
|
2
|
-
import { isEthereumToken, currency2buffer } from '../utils'
|
|
2
|
+
import { isEthereumToken, currency2buffer, getBaseAsset } from '../utils'
|
|
3
3
|
import { CHAIN_IDS } from '../constants'
|
|
4
4
|
|
|
5
5
|
import type { UnsignedTransaction } from '#/app-models'
|
|
6
6
|
|
|
7
7
|
export default function createUnsignedTx({
|
|
8
|
-
baseAsset,
|
|
9
8
|
asset,
|
|
10
9
|
address,
|
|
11
10
|
amount,
|
|
@@ -23,6 +22,7 @@ export default function createUnsignedTx({
|
|
|
23
22
|
txInput = Buffer.alloc(0)
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
const baseAsset = getBaseAsset(asset)
|
|
26
26
|
if (!chainId) chainId = CHAIN_IDS[baseAsset.name] // mainnet
|
|
27
27
|
|
|
28
28
|
const isToken = isEthereumToken(asset)
|