You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/thirdweb/src/bridge/Status.ts
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ import type { Status } from "./types/Status.js";
23
23
* If the transaction is complete, a response might look like:
24
24
* ```typescript
25
25
* {
26
-
* status: 'completed',
26
+
* status: 'COMPLETED',
27
27
* originAmount: 200000000000000n,
28
28
* destinationAmount: 188625148000000n,
29
29
* originChainId: 8453,
@@ -43,10 +43,18 @@ import type { Status } from "./types/Status.js";
43
43
* }
44
44
* ```
45
45
*
46
+
* If the origin transaction hasn't been mined yet, a response might look like:
47
+
* ```typescript
48
+
* {
49
+
* status: "NOT_FOUND",
50
+
* }
51
+
* ```
52
+
* This is to allow you to poll for the status without catching an error. Be sure your transaction hash and chain are correct though, as this could also represent a legitimate 404 if the transaction doesn't exist.
53
+
*
46
54
* If the transaction is still pending, a response might look like:
47
55
* ```typescript
48
56
* {
49
-
* status: "pending",
57
+
* status: "PENDING",
50
58
* originAmount: 1000000000000000000n,
51
59
* originChainId: 466,
52
60
* destinationChainId: 1,
@@ -64,7 +72,7 @@ import type { Status } from "./types/Status.js";
64
72
* If the transaction failed, a response might look like:
@@ -76,7 +84,7 @@ import type { Status } from "./types/Status.js";
76
84
*
77
85
* This status is for a **single origin transaction only**. If your route involves multiple transactions, you'll need to get the status for each of them individually.
78
86
*
79
-
* If sending multiple dependent sequential transactions, wait until `status` returns `completed` before sending the next transaction.
87
+
* If sending multiple dependent sequential transactions, wait until `status` returns `COMPLETED` before sending the next transaction.
80
88
*
81
89
* You can access this function's input and output types with `status.Options` and `status.Result`, respectively.
82
90
*
@@ -88,6 +96,8 @@ import type { Status } from "./types/Status.js";
88
96
* @returns A promise that resolves to a status object for the transaction.
89
97
*
90
98
* @throws Will throw an error if there is an issue fetching the status.
0 commit comments