@exodus/web3-ethereum-utils 1.4.0 → 1.5.0
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/lib/transactions.d.ts +1 -1
- package/lib/transactions.js +3 -3
- package/package.json +2 -2
package/lib/transactions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
export declare function getTransactionId(serializedTransaction: Buffer, isEIP1559Transaction
|
|
2
|
+
export declare function getTransactionId(serializedTransaction: Buffer, isEIP1559Transaction?: boolean): string;
|
package/lib/transactions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FeeMarketEIP1559Transaction, Transaction as LegacyTransaction, } from '@exodus/ethereumjs-tx';
|
|
2
|
-
export function getTransactionId(serializedTransaction, isEIP1559Transaction) {
|
|
3
|
-
const
|
|
2
|
+
export function getTransactionId(serializedTransaction, isEIP1559Transaction = false) {
|
|
3
|
+
const Transaction = isEIP1559Transaction
|
|
4
4
|
? FeeMarketEIP1559Transaction
|
|
5
5
|
: LegacyTransaction;
|
|
6
|
-
const transaction =
|
|
6
|
+
const transaction = Transaction.fromSerializedTx(serializedTransaction);
|
|
7
7
|
return `0x${transaction.hash().toString('hex')}`;
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/web3-ethereum-utils",
|
|
3
3
|
"description": "Web3 Ethereum utils.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"module": "lib/index.js",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@exodus/ethereumjs-tx": "^3.3.0-exodus.6",
|
|
31
31
|
"@metamask/eth-sig-util": "^4.0.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "db8cb587aefb460eb440ed2280d697f6896a1614"
|
|
34
34
|
}
|