Skip to content

Commit

Permalink
chore(bridge-ui-v2): only allow preconfigured mintable tokens in fauc…
Browse files Browse the repository at this point in the history
…et (#14714)
  • Loading branch information
KorbinianK committed Sep 28, 2023
1 parent 49adf25 commit 68ce2e5
Show file tree
Hide file tree
Showing 4 changed files with 950 additions and 1,960 deletions.
4 changes: 2 additions & 2 deletions packages/bridge-ui-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"ts-morph": "^19.0.0",
"tslib": "^2.4.1",
"typescript": "^5.1.6",
"vite": "^3.2.7",
"vite-tsconfig-paths": "^4.2.0",
"vite": "^4.4.9",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.32.2",
"vitest-fetch-mock": "^0.2.2"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/bridge-ui-v2/src/components/Faucet/Faucet.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
let selectedToken: Token;
let mintButtonEnabled = false;
let alertMessage = '';
let mintableTokens: Token[] = [];
const onlyMintable: boolean = true;
async function switchNetworkToL1() {
if (switchingNetwork) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,27 +82,28 @@
</div>
</li>
{/each}
{#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="
{#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="
body-bold
bg-transparent
flex-1
Expand Down
Loading

0 comments on commit 68ce2e5

Please sign in to comment.