Skip to content

Commit

Permalink
fix(bridge-ui-v2): custom tokens from local storage (#14677)
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK committed Sep 28, 2023
1 parent b0316df commit 2fdd667
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { destNetwork, destOptions } from '$components/Bridge/state';
import SwitchChainsButton from '$components/Bridge/SwitchChainsButton.svelte';
import { ChainSelector } from '$components/ChainSelector';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@
on:click={() => selectToken(t)}
on:keydown={getTokenKeydownHandler(t)}>
<div class="p-4">
<!-- Only match icons to configurd tokens -->
{#if symbolToIconMap[t.symbol] && !t.imported}
{#if symbolToIconMap[t.symbol]}
<i role="img" aria-label={t.name}>
<svelte:component this={symbolToIconMap[t.symbol]} size={28} />
</i>
Expand All @@ -83,28 +82,27 @@
</div>
</li>
{/each}
{#if !onlyMintable}
{#each customTokens as ct, index (index)}
<li
role="option"
tabindex="0"
aria-selected={ct === value}
on:click={() => selectToken(ct)}
on:keydown={getTokenKeydownHandler(ct)}>
<div class="p-4">
<i role="img" aria-label={ct.name}>
<Erc20 />
</i>
<span class="body-bold">{ct.symbol}</span>
</div>
</li>
{/each}
<div class="h-sep my-[8px]" />
<li>
<button on:click={showAddERC20} class="flex hover:bg-dark-5 justify-center items-center rounded-lg h-[64px]">
<Icon type="plus-circle" fillClass="fill-primary-icon" size={32} vWidth={28} vHeight={28} />
<span
class="
{#each customTokens as ct, index (index)}
<li
role="option"
tabindex="0"
aria-selected={ct === value}
on:click={() => selectToken(ct)}
on:keydown={getTokenKeydownHandler(ct)}>
<div class="p-4">
<i role="img" aria-label={ct.name}>
<Erc20 />
</i>
<span class="body-bold">{ct.symbol}</span>
</div>
</li>
{/each}
<div class="h-sep my-[8px]" />
<li>
<button on:click={showAddERC20} class="flex hover:bg-dark-5 justify-center items-center rounded-lg h-[64px]">
<Icon type="plus-circle" fillClass="fill-primary-icon" size={32} vWidth={28} vHeight={28} />
<span
class="
body-bold
bg-transparent
flex-1
Expand Down

0 comments on commit 2fdd667

Please sign in to comment.