Skip to content

Commit 0bf802f

Browse files
committed
[MNY-236] Portal: Update BridgeWidget script docs to reflect new typescript type
1 parent 777aed1 commit 0bf802f

File tree

1 file changed

+9
-13
lines changed
  • apps/portal/src/app/bridge/bridge-widget-script

1 file changed

+9
-13
lines changed

apps/portal/src/app/bridge/bridge-widget-script/page.mdx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ The BridgeWidget Script makes it easy to embed cross-chain swaps and fiat onramp
5353
BridgeWidget.render(container, {
5454
clientId: "your-thirdweb-client-id",
5555
theme: "dark",
56-
buy: {
57-
chainId: 8453,
58-
amount: "0.1",
59-
},
6056
});
6157
</script>
6258
```
@@ -126,9 +122,9 @@ type Options = {
126122
};
127123
};
128124
};
129-
buy: {
130-
amount: string;
131-
chainId: number;
125+
buy?: {
126+
amount?: string;
127+
chainId?: number;
132128
tokenAddress?: string;
133129
buttonLabel?: string;
134130
onCancel?: (quote: BuyOrOnrampPrepareResult | undefined) => void;
@@ -310,8 +306,8 @@ The options to configure the "Buy" tab UI.
310306

311307
```ts
312308
type Buy = {
313-
amount: string; // Required
314-
chainId: number; // Required
309+
amount?: string;
310+
chainId?: number;
315311
tokenAddress?: string;
316312
buttonLabel?: string;
317313
onCancel?: (quote: BuyOrOnrampPrepareResult | undefined) => void;
@@ -327,21 +323,21 @@ type Buy = {
327323
```
328324
329325
330-
<Details summary="amount" tags={["Required"]}>
326+
<Details summary="amount">
331327
332328
Set the default token amount shown in the "Buy" tab.
333329
334330
</Details>
335331
336-
<Details summary="chainId" tags={["Required"]}>
332+
<Details summary="chainId">
337333
338-
Specify which chain should be selected in the "Buy" tab.
334+
Specify the default chain to be selected in the "Buy" tab.
339335
340336
</Details>
341337
342338
<Details summary="tokenAddress">
343339
344-
Specify which token should be selected in the "Buy" tab. If not specified, the native token of the selected chain will be selected.
340+
Specify the default token to be selected in the "Buy" tab. If not specified, the native token of the selected chain will be selected.
345341
346342
</Details>
347343

0 commit comments

Comments
 (0)