File tree Expand file tree Collapse file tree 8 files changed +58
-50
lines changed
dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server Expand file tree Collapse file tree 8 files changed +58
-50
lines changed Original file line number Diff line number Diff line change 11import { defineChain , type ThirdwebClient } from "thirdweb" ;
22import type { ChainMetadata } from "thirdweb/chains" ;
3- import { SectionTitle } from "./SectionTitle" ;
43import { BuyWidget } from "thirdweb/react" ;
4+ import { SectionTitle } from "./SectionTitle" ;
55
66export function BuyFundsSection ( props : {
77 chain : ChainMetadata ;
@@ -11,9 +11,10 @@ export function BuyFundsSection(props: {
1111 < section className = "flex flex-col gap-4 items-center justify-center" >
1212 < SectionTitle title = "Bridge" />
1313 < BuyWidget
14- client = { props . client }
15- chain = { defineChain ( props . chain . chainId ) }
1614 amount = "0.01"
15+ // eslint-disable-next-line no-restricted-syntax
16+ chain = { defineChain ( props . chain . chainId ) }
17+ client = { props . client }
1718 />
1819 </ section >
1920 ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " login" ,
3+ "version" : " 0.0.0" ,
4+ "private" : true
5+ }
Original file line number Diff line number Diff line change @@ -163,13 +163,13 @@ export declare namespace quote {
163163 client : ThirdwebClient ;
164164 maxSteps ?: number ;
165165 } & (
166- | {
166+ | {
167167 buyAmountWei : bigint ;
168168 }
169- | {
169+ | {
170170 amount : bigint ;
171171 }
172- ) ;
172+ ) ;
173173
174174 type Result = Quote & {
175175 intent : {
Original file line number Diff line number Diff line change @@ -166,15 +166,15 @@ export type BuyWidgetProps = {
166166type UIOptionsResult =
167167 | { type : "success" ; data : UIOptions }
168168 | {
169- type : "indexing_token" ;
170- token : Token ;
171- chain : Chain ;
172- }
169+ type : "indexing_token" ;
170+ token : Token ;
171+ chain : Chain ;
172+ }
173173 | {
174- type : "unsupported_token" ;
175- tokenAddress : Address ;
176- chain : Chain ;
177- } ;
174+ type : "unsupported_token" ;
175+ tokenAddress : Address ;
176+ chain : Chain ;
177+ } ;
178178
179179/**
180180 * Widget is a prebuilt UI for purchasing a specific token.
@@ -285,7 +285,7 @@ export function BuyWidget(props: BuyWidgetProps) {
285285 ! props . tokenAddress ||
286286 ( isAddress ( props . tokenAddress ) &&
287287 checksumAddress ( props . tokenAddress ) ===
288- checksumAddress ( NATIVE_TOKEN_ADDRESS ) )
288+ checksumAddress ( NATIVE_TOKEN_ADDRESS ) )
289289 ) {
290290 const ETH = await getToken (
291291 props . client ,
@@ -455,10 +455,10 @@ type BuyWidgetConnectOptions = {
455455 * ```
456456 */
457457 autoConnect ?:
458- | {
459- timeout : number ;
460- }
461- | boolean ;
458+ | {
459+ timeout : number ;
460+ }
461+ | boolean ;
462462
463463 /**
464464 * Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.
Original file line number Diff line number Diff line change @@ -172,15 +172,15 @@ export type CheckoutWidgetProps = {
172172type UIOptionsResult =
173173 | { type : "success" ; data : UIOptions }
174174 | {
175- type : "indexing_token" ;
176- token : Token ;
177- chain : Chain ;
178- }
175+ type : "indexing_token" ;
176+ token : Token ;
177+ chain : Chain ;
178+ }
179179 | {
180- type : "unsupported_token" ;
181- tokenAddress : Address ;
182- chain : Chain ;
183- } ;
180+ type : "unsupported_token" ;
181+ tokenAddress : Address ;
182+ chain : Chain ;
183+ } ;
184184
185185/**
186186 * Widget a prebuilt UI for purchasing a specific token.
@@ -418,10 +418,10 @@ type CheckoutWidgetConnectOptions = {
418418 * ```
419419 */
420420 autoConnect ?:
421- | {
422- timeout : number ;
423- }
424- | boolean ;
421+ | {
422+ timeout : number ;
423+ }
424+ | boolean ;
425425
426426 /**
427427 * Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.
Original file line number Diff line number Diff line change @@ -172,15 +172,15 @@ export type TransactionWidgetProps = {
172172type UIOptionsResult =
173173 | { type : "success" ; data : UIOptions }
174174 | {
175- type : "indexing_token" ;
176- token : Token ;
177- chain : Chain ;
178- }
175+ type : "indexing_token" ;
176+ token : Token ;
177+ chain : Chain ;
178+ }
179179 | {
180- type : "unsupported_token" ;
181- tokenAddress : Address ;
182- chain : Chain ;
183- } ;
180+ type : "unsupported_token" ;
181+ tokenAddress : Address ;
182+ chain : Chain ;
183+ } ;
184184
185185/**
186186 * Widget a prebuilt UI for purchasing a specific token.
@@ -443,10 +443,10 @@ type TransactionWidgetConnectOptions = {
443443 * ```
444444 */
445445 autoConnect ?:
446- | {
447- timeout : number ;
448- }
449- | boolean ;
446+ | {
447+ timeout : number ;
448+ }
449+ | boolean ;
450450
451451 /**
452452 * Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.
Original file line number Diff line number Diff line change @@ -356,9 +356,9 @@ export function PayEmbed(props: PayEmbedProps) {
356356 amount = { props . payOptions . prefillBuy . amount || "0.01" }
357357 chain = { props . payOptions . prefillBuy . chain }
358358 client = { props . client }
359+ onSuccess = { ( ) => props . payOptions ?. onPurchaseSuccess ?.( ) }
359360 theme = { theme }
360361 title = { metadata ?. name || "Buy" }
361- onSuccess = { ( ) => props . payOptions ?. onPurchaseSuccess ?.( ) }
362362 tokenAddress = {
363363 props . payOptions . prefillBuy . token ?. address as Address | undefined
364364 }
@@ -375,8 +375,8 @@ export function PayEmbed(props: PayEmbedProps) {
375375 description = { metadata ?. description }
376376 image = { metadata ?. image }
377377 name = { metadata ?. name || "Checkout" }
378- seller = { props . payOptions . paymentInfo . sellerAddress as Address }
379378 onSuccess = { ( ) => props . payOptions ?. onPurchaseSuccess ?.( ) }
379+ seller = { props . payOptions . paymentInfo . sellerAddress as Address }
380380 theme = { theme }
381381 tokenAddress = {
382382 props . payOptions . paymentInfo . token ?. address as Address | undefined
@@ -391,8 +391,8 @@ export function PayEmbed(props: PayEmbedProps) {
391391 client = { props . client }
392392 description = { metadata ?. description }
393393 image = { metadata ?. image }
394- theme = { theme }
395394 onSuccess = { ( ) => props . payOptions ?. onPurchaseSuccess ?.( ) }
395+ theme = { theme }
396396 title = { metadata ?. name }
397397 transaction = { props . payOptions . transaction }
398398 />
@@ -513,10 +513,10 @@ export type PayEmbedConnectOptions = {
513513 * ```
514514 */
515515 autoConnect ?:
516- | {
517- timeout : number ;
518- }
519- | boolean ;
516+ | {
517+ timeout : number ;
518+ }
519+ | boolean ;
520520
521521 /**
522522 * Metadata of the app that will be passed to connected wallet. Setting this is highly recommended.
You can’t perform that action at this time.
0 commit comments