Skip to content

Commit

Permalink
Fix init component
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhlmm committed Feb 22, 2024
1 parent 0205db8 commit 0457e06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v18.18
34 changes: 15 additions & 19 deletions src/UI/SwapWidget/SwapWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,23 @@
export let address;
export let showSideTokenSwap;
let widgetConfig;
$: {
if (showSideTokenSwap) {
widgetConfig = {
integrator: "Nimbus",
variant: "default",
gmPointCoefficient: "5",
userNimbusOwner: $userPublicAddress,
fromToken: address,
fromChain: Number(handleFormatBlockChainId(chain)),
};
}
}
$: widgetConfig = {
integrator: "Nimbus",
variant: "default",
gmPointCoefficient: "5",
userNimbusOwner: $userPublicAddress,
fromToken: address,
fromChain: Number(handleFormatBlockChainId(chain)),
};
</script>

<ReactAdapter
element={LiFiWidget}
config={widgetConfig}
integrator="svelte-example"
/>
{#if showSideTokenSwap}
<ReactAdapter
element={LiFiWidget}
config={widgetConfig}
integrator="svelte-example"
/>
{/if}

<style>
</style>

0 comments on commit 0457e06

Please sign in to comment.