@@ -96,6 +96,7 @@ import type { Status } from "./types/Status.js";
96
96
* @param options - The options for the quote.
97
97
* @param options.transactionHash - The hash of the origin transaction to get the bridge status for.
98
98
* @param options.chainId - The chain ID of the origin token.
99
+ * @param options.transactionId - The transaction ID received from the `prepare` request.
99
100
* @param options.client - Your thirdweb client.
100
101
*
101
102
* @returns A promise that resolves to a status object for the transaction.
@@ -105,13 +106,16 @@ import type { Status } from "./types/Status.js";
105
106
* @beta
106
107
*/
107
108
export async function status ( options : status . Options ) : Promise < status . Result > {
108
- const { transactionHash, client } = options ;
109
+ const { transactionHash, client, transactionId } = options ;
109
110
const chainId = "chainId" in options ? options . chainId : options . chain . id ;
110
111
111
112
const clientFetch = getClientFetch ( client ) ;
112
113
const url = new URL ( `${ getThirdwebBaseUrl ( "bridge" ) } /v1/status` ) ;
113
114
url . searchParams . set ( "transactionHash" , transactionHash ) ;
114
115
url . searchParams . set ( "chainId" , chainId . toString ( ) ) ;
116
+ if ( transactionId ) {
117
+ url . searchParams . set ( "transactionId" , transactionId ) ;
118
+ }
115
119
116
120
const response = await clientFetch ( url . toString ( ) ) ;
117
121
if ( ! response . ok ) {
@@ -195,6 +199,8 @@ export declare namespace status {
195
199
transactionHash : ox__Hex . Hex ;
196
200
/** The chain ID where the transaction occurred */
197
201
chainId : number ;
202
+ /** The transaction ID received from the `prepare` request */
203
+ transactionId ?: string ;
198
204
/** Your thirdweb client */
199
205
client : ThirdwebClient ;
200
206
}
@@ -203,6 +209,8 @@ export declare namespace status {
203
209
transactionHash : ox__Hex . Hex ;
204
210
/** The chain object where the transaction occurred */
205
211
chain : Chain ;
212
+ /** The transaction ID received from the `prepare` request */
213
+ transactionId ?: string ;
206
214
/** Your thirdweb client */
207
215
client : ThirdwebClient ;
208
216
} ;
0 commit comments