File tree Expand file tree Collapse file tree 6 files changed +36
-36
lines changed
packages/thirdweb/src/universal Expand file tree Collapse file tree 6 files changed +36
-36
lines changed Original file line number Diff line number Diff line change 1+ import { toWei } from "src/utils/units.js" ;
12import { describe , expect , it } from "vitest" ;
2- import * as Buy from "./Buy.js" ;
33import { TEST_CLIENT } from "~test/test-clients.js" ;
4- import { toWei } from "src/utils/units .js" ;
4+ import * as Buy from "./Buy .js" ;
55
66describe ( "Universal.Buy.quote" , ( ) => {
77 it ( "should get a valid quote" , async ( ) => {
Original file line number Diff line number Diff line change 11import type { Address as ox__Address } from "ox" ;
2- import type { PreparedQuote , Quote } from "./types/Quote.js" ;
32import type { ThirdwebClient } from "../client/client.js" ;
43import { getClientFetch } from "../utils/fetch.js" ;
54import { UNIVERSAL_BRIDGE_URL } from "./constants.js" ;
5+ import type { PreparedQuote , Quote } from "./types/Quote.js" ;
66
77/**
88 * Retrieves a Universal Bridge quote for the provided buy intent. The quote will specify the necessary `originAmount` to receive the desired `destinationAmount`, which is specified with the `buyAmountWei` option.
Original file line number Diff line number Diff line change 1- import type { Hex as ox__Hex , Address as ox__Address } from "ox" ;
1+ import type { Address as ox__Address , Hex as ox__Hex } from "ox" ;
22import type { ThirdwebClient } from "../client/client.js" ;
33import { getClientFetch } from "../utils/fetch.js" ;
44import { UNIVERSAL_BRIDGE_URL } from "./constants.js" ;
Original file line number Diff line number Diff line change 1+ import { toWei } from "src/utils/units.js" ;
12import { describe , expect , it } from "vitest" ;
2- import * as Sell from "./Sell.js" ;
33import { TEST_CLIENT } from "~test/test-clients.js" ;
4- import { toWei } from "src/utils/units .js" ;
4+ import * as Sell from "./Sell .js" ;
55
66describe ( "Universal.Sell.quote" , ( ) => {
77 it ( "should get a valid quote" , async ( ) => {
Original file line number Diff line number Diff line change 11import type { Address as ox__Address } from "ox" ;
2- import type { PreparedQuote , Quote } from "./types/Quote.js" ;
32import type { ThirdwebClient } from "../client/client.js" ;
43import { getClientFetch } from "../utils/fetch.js" ;
54import { UNIVERSAL_BRIDGE_URL } from "./constants.js" ;
5+ import type { PreparedQuote , Quote } from "./types/Quote.js" ;
66
77/**
88 * Retrieves a Universal Bridge quote for the provided sell intent. The quote will specify the expected `destinationAmount` that will be received in exchange for the specified `originAmount`, which is specified with the `sellAmountWei` option.
Original file line number Diff line number Diff line change @@ -2,34 +2,34 @@ import type { Address as ox__Address, Hex as ox__Hex } from "ox";
22
33export type Status =
44 | {
5- status : "completed" ;
6- originAmount : bigint ;
7- destinationAmount : bigint ;
8- originChainId : number ;
9- destinationChainId : number ;
10- originTokenAddress : ox__Address . Address ;
11- destinationTokenAddress : ox__Address . Address ;
12- transactions : Array < {
13- chainId : number ;
14- transactionHash : ox__Hex . Hex ;
15- } > ;
16- }
5+ status : "completed" ;
6+ originAmount : bigint ;
7+ destinationAmount : bigint ;
8+ originChainId : number ;
9+ destinationChainId : number ;
10+ originTokenAddress : ox__Address . Address ;
11+ destinationTokenAddress : ox__Address . Address ;
12+ transactions : Array < {
13+ chainId : number ;
14+ transactionHash : ox__Hex . Hex ;
15+ } > ;
16+ }
1717 | {
18- status : "pending" ;
19- originAmount : bigint ;
20- originChainId : number ;
21- destinationChainId : number ;
22- originTokenAddress : ox__Address . Address ;
23- destinationTokenAddress : ox__Address . Address ;
24- transactions : Array < {
25- chainId : number ;
26- transactionHash : ox__Hex . Hex ;
27- } > ;
28- }
18+ status : "pending" ;
19+ originAmount : bigint ;
20+ originChainId : number ;
21+ destinationChainId : number ;
22+ originTokenAddress : ox__Address . Address ;
23+ destinationTokenAddress : ox__Address . Address ;
24+ transactions : Array < {
25+ chainId : number ;
26+ transactionHash : ox__Hex . Hex ;
27+ } > ;
28+ }
2929 | {
30- status : "failed" ;
31- transactions : Array < {
32- chainId : number ;
33- transactionHash : ox__Hex . Hex ;
34- } > ;
35- } ;
30+ status : "failed" ;
31+ transactions : Array < {
32+ chainId : number ;
33+ transactionHash : ox__Hex . Hex ;
34+ } > ;
35+ } ;
You can’t perform that action at this time.
0 commit comments