@exodus/web3-ethereum-utils 1.4.0 → 1.6.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/lib/types.d.ts +10 -0
- 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/lib/types.d.ts
CHANGED
|
@@ -30,3 +30,13 @@ export declare type EthParentCapability = 'eth_accounts';
|
|
|
30
30
|
export interface EthWalletPermission {
|
|
31
31
|
parentCapability: EthParentCapability;
|
|
32
32
|
}
|
|
33
|
+
export declare type EthWalletWatchAssetOptions = {
|
|
34
|
+
address: string;
|
|
35
|
+
symbol?: string;
|
|
36
|
+
decimals?: number;
|
|
37
|
+
image?: string;
|
|
38
|
+
};
|
|
39
|
+
export interface EthWalletWatchAsset {
|
|
40
|
+
type: string;
|
|
41
|
+
options: EthWalletWatchAssetOptions;
|
|
42
|
+
}
|
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.6.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": "723dcbf538680560af5e7b7524ab394b83e8e95c"
|
|
34
34
|
}
|