File tree 2 files changed +36
-4
lines changed
packages/thirdweb/src/bridge
2 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,25 @@ describe("parseIncomingWebhook", () => {
28
28
clientId : "client123" ,
29
29
action : "TRANSFER" ,
30
30
status : "COMPLETED" ,
31
- originToken : "0x1234567890123456789012345678901234567890" as const ,
31
+ originToken : {
32
+ chainId : 1 ,
33
+ address : "0x1234567890123456789012345678901234567890" as const ,
34
+ name : "Token" ,
35
+ symbol : "TKN" ,
36
+ decimals : 18 ,
37
+ priceUsd : 1.0 ,
38
+ iconUri : "https://example.com/icon.png" ,
39
+ } ,
32
40
originAmount : "1.0" ,
33
- destinationToken : "0x1234567890123456789012345678901234567890" ,
41
+ destinationToken : {
42
+ chainId : 1 ,
43
+ address : "0x1234567890123456789012345678901234567890" as const ,
44
+ name : "Token" ,
45
+ symbol : "TKN" ,
46
+ decimals : 18 ,
47
+ priceUsd : 1.0 ,
48
+ iconUri : "https://example.com/icon.png" ,
49
+ } ,
34
50
destinationAmount : "1.0" ,
35
51
sender : "0x1234567890123456789012345678901234567890" ,
36
52
receiver : "0x1234567890123456789012345678901234567890" ,
Original file line number Diff line number Diff line change @@ -23,9 +23,25 @@ const webhookSchema = z.union([
23
23
clientId : z . string ( ) ,
24
24
action : z . enum ( [ "TRANSFER" , "BUY" , "SELL" ] ) ,
25
25
status : z . enum ( [ "PENDING" , "FAILED" , "COMPLETED" ] ) ,
26
- originToken : addressSchema ,
26
+ originToken : z . object ( {
27
+ chainId : z . number ( ) ,
28
+ address : addressSchema ,
29
+ name : z . string ( ) ,
30
+ symbol : z . string ( ) ,
31
+ decimals : z . number ( ) ,
32
+ priceUsd : z . number ( ) ,
33
+ iconUri : z . optional ( z . string ( ) ) ,
34
+ } ) ,
27
35
originAmount : z . string ( ) ,
28
- destinationToken : addressSchema ,
36
+ destinationToken : z . object ( {
37
+ chainId : z . number ( ) ,
38
+ address : addressSchema ,
39
+ name : z . string ( ) ,
40
+ symbol : z . string ( ) ,
41
+ decimals : z . number ( ) ,
42
+ priceUsd : z . number ( ) ,
43
+ iconUri : z . optional ( z . string ( ) ) ,
44
+ } ) ,
29
45
destinationAmount : z . string ( ) ,
30
46
sender : addressSchema ,
31
47
receiver : addressSchema ,
You can’t perform that action at this time.
0 commit comments