File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
packages/thirdweb/src/bridge Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -3,16 +3,36 @@ import { TEST_CLIENT } from "~test/test-clients.js";
33import { status } from "./Status.js" ;
44
55describe ( "Bridge.status" , ( ) => {
6- it ( "should handle invalid transaction hash without throwing " , async ( ) => {
6+ it ( "should handle successful status " , async ( ) => {
77 const result = await status ( {
88 transactionHash :
99 "0xe199ef82a0b6215221536e18ec512813c1aa10b4f5ed0d4dfdfcd703578da56d" ,
10- chainId : 1 ,
10+ chainId : 8453 ,
1111 client : TEST_CLIENT ,
1212 } ) ;
1313
1414 expect ( result ) . toBeDefined ( ) ;
15- expect ( result . status ) . toBe ( "failed" ) ;
16- expect ( result . transactions ) . toBeDefined ( ) ;
15+ expect ( result . status ) . toBe ( "completed" ) ;
16+ expect ( result ) . toMatchInlineSnapshot ( `
17+ {
18+ "destinationAmount": 188625148000000n,
19+ "destinationChainId": 2741,
20+ "destinationTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
21+ "originAmount": 200000000000000n,
22+ "originChainId": 8453,
23+ "originTokenAddress": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
24+ "status": "completed",
25+ "transactions": [
26+ {
27+ "chainId": 8453,
28+ "transactionHash": "0xe199ef82a0b6215221536e18ec512813c1aa10b4f5ed0d4dfdfcd703578da56d",
29+ },
30+ {
31+ "chainId": 2741,
32+ "transactionHash": "0xa70a82f42330f54be95a542e1fcfe6ed2dd9f07fb8c82ae67afb4342319f7433",
33+ },
34+ ],
35+ }
36+ ` ) ;
1737 } ) ;
1838} ) ;
You can’t perform that action at this time.
0 commit comments