@hairy/ether-lib 1.22.0 → 1.23.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/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -93,7 +93,7 @@ async function wait(transaction) {
|
|
|
93
93
|
transaction = await transaction();
|
|
94
94
|
if (transaction instanceof Promise)
|
|
95
95
|
transaction = await transaction;
|
|
96
|
-
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.
|
|
96
|
+
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.wait());
|
|
97
97
|
emitter.emit("after", receipt);
|
|
98
98
|
return receipt;
|
|
99
99
|
} catch (error) {
|
package/dist/index.d.ts
CHANGED
|
@@ -37,17 +37,17 @@ interface FormatEtherOptions {
|
|
|
37
37
|
declare function formatEther(value?: Numberish, options?: FormatEtherOptions): string;
|
|
38
38
|
|
|
39
39
|
type GenericTransactionResponse = TransactionResponse | ContractTransactionResponse | Promise<TransactionResponse | ContractTransactionResponse> | (() => TransactionResponse | ContractTransactionResponse) | (() => Promise<TransactionResponse | ContractTransactionResponse>);
|
|
40
|
-
declare function wait(transaction: GenericTransactionResponse): Promise<
|
|
40
|
+
declare function wait(transaction: GenericTransactionResponse): Promise<TransactionReceipt | null | undefined>;
|
|
41
41
|
declare namespace wait {
|
|
42
42
|
var subscribe: {
|
|
43
43
|
<Key extends "before" | "after" | "error">(type: Key, handler: mitt.Handler<{
|
|
44
44
|
before: void;
|
|
45
|
-
after: TransactionReceipt | null;
|
|
45
|
+
after: TransactionReceipt | null | undefined;
|
|
46
46
|
error: Error;
|
|
47
47
|
}[Key]>): void;
|
|
48
48
|
(type: "*", handler: mitt.WildcardHandler<{
|
|
49
49
|
before: void;
|
|
50
|
-
after: TransactionReceipt | null;
|
|
50
|
+
after: TransactionReceipt | null | undefined;
|
|
51
51
|
error: Error;
|
|
52
52
|
}>): void;
|
|
53
53
|
};
|
package/dist/index.global.js
CHANGED
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
transaction = await transaction();
|
|
174
174
|
if (transaction instanceof Promise)
|
|
175
175
|
transaction = await transaction;
|
|
176
|
-
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.
|
|
176
|
+
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.wait());
|
|
177
177
|
emitter.emit("after", receipt);
|
|
178
178
|
return receipt;
|
|
179
179
|
} catch (error) {
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ async function wait(transaction) {
|
|
|
54
54
|
transaction = await transaction();
|
|
55
55
|
if (transaction instanceof Promise)
|
|
56
56
|
transaction = await transaction;
|
|
57
|
-
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.
|
|
57
|
+
const receipt = await transaction.getTransaction().then((transaction2) => transaction2?.wait());
|
|
58
58
|
emitter.emit("after", receipt);
|
|
59
59
|
return receipt;
|
|
60
60
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hairy/ether-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0",
|
|
5
5
|
"description": "Library for ether",
|
|
6
6
|
"author": "Hairyf <wwu710632@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"mitt": "^3.0.1",
|
|
29
|
-
"@hairy/utils": "1.
|
|
29
|
+
"@hairy/utils": "1.23.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"ethers": "^6"
|