@exodus/ethereum-lib 2.10.6 → 2.10.7
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/utils/index.js +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/ethereum-lib",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"description": "Ethereum Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@exodus/assets": "8.0.x"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "f89f33caaa18c960071628b7a0cb740481c10705"
|
|
28
28
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -54,13 +54,14 @@ export function getBaseAsset(asset) {
|
|
|
54
54
|
return isEthereumToken(asset) ? assets.ethereum : asset
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
const TRANSACTION_TYPE = 2
|
|
58
|
+
const TRANSACTION_TYPE_BUFFER = Buffer.from(TRANSACTION_TYPE.toString(16).padStart(2, '0'), 'hex')
|
|
59
|
+
|
|
57
60
|
export function deserialize(hex) {
|
|
58
61
|
const buf = ethUtil.toBuffer(hex)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return Transaction.fromSerializedTx(buf)
|
|
63
|
-
}
|
|
62
|
+
return buf.slice(0, 1).equals(TRANSACTION_TYPE_BUFFER)
|
|
63
|
+
? FeeMarketEIP1559Transaction.fromSerializedTx(buf)
|
|
64
|
+
: Transaction.fromSerializedTx(buf)
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
const getTxType = (serializedTx: string) => serializedTx.slice(2, 4)
|