diff --git a/docs/develop/asset-transfer-via-nitro/tools/nitro-widget/README.md b/docs/develop/asset-transfer-via-nitro/tools/nitro-widget/README.md index f8b58e61..d314a1aa 100644 --- a/docs/develop/asset-transfer-via-nitro/tools/nitro-widget/README.md +++ b/docs/develop/asset-transfer-via-nitro/tools/nitro-widget/README.md @@ -14,34 +14,46 @@ const baseUrl = "https://nitro.routerprotocol.com/swap"; const configuration = { isWidget: true, partnerId: "0", // get your unique partner id - https://app.routernitro.com/partnerId -fromChain: "80001", -toChain: "43113", +fromChainId: "80001", +toChainId: "43113", fromToken: "0x22bAA8b6cdd31a0C5D1035d6e72043f4Ce6aF054", toToken: "0xb452b513552aa0B57c4b1C9372eFEa78024e5936", -ctaColor: "#E8425A", -textColor: "#1A1B1C", -backgroundColor: "#3fb043", +ctaColor: "hsl(0, 45%, 33%)", +textColor: "hsl(219, 59%, 57%)", +appColor: "hsl(154, 49%, 57%)", +inputColor: "hsl(74, 41%, 61%)", logoURI: "ipfs://QmaznB5PRhMC696u8yZuzN6Uwrnp7Zmfa5CydVUMvLJc9i/aDAI.svg", -display: "vertical", -isFromSelLocked: "1", -isToSelLocked: "0", +lockFromSelections: true, +lockToSelections: false, +slippageTolerance: "1", +theme: "dark" }; -const paramString = new URLSearchParams(configuration).toString(); -document.getElementById("widget__iframe").src = `${baseUrl}?${paramString}`; +const configurationUrl = new URLSearchParams(configuration).toString(); +const widgetUrl = `${baseUrl}?${configurationUrl}`; ``` :::note 1. You can use [Nitro's Widget Builder Tool](https://app.routernitro.com/widget) to automatically generate the widget paramaters. 2. In case you want source / destination token to be native token, then the following value should be used for token address - 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE -3. To integrate the widget on your UI, you will be assigned a unique partner ID. To get your partner ID, please use the link [here](https://app.routernitro.com/partnerId). +3. To integrate the widget on your UI, you will be assigned a unique partner ID. To get your partner ID, please use the link [here](https://nitro.routerprotocol.com/partnerId). ::: ```jsx - + +/> ``` Restriction parameters are optional and can be added along with the aforementioned parameters as query params in the URL -