Skip to content

Commit

Permalink
fix(site): simplify sepolia faucet button
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Oct 18, 2023
1 parent 601a611 commit 25cfae9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
3 changes: 1 addition & 2 deletions site/src/routes/blog/start-of-the-endgame/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ On Sepolia, the zero-knowledge proof is verified inside the IBC contract stack.

<TransferUnoToEthereumStatus/>

To transfer the $UNO back, we need to obtain some Sepolia ETH for gas fees.

To transfer the $UNO back, we need to obtain some Sepolia ETH for gas fees.

<SepoliaFaucetButton/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
<script>
import { ethereumAddress } from '$lib/stores/wallets'
import { get } from "svelte/store";
import { ethereumAddress } from '$lib/stores/wallets'
import TerminalContainer from "$lib/TerminalContainer.svelte";
import DemoButton from '$lib/DemoButton.svelte';
import DemoButtonA from '$lib/DemoButtonA.svelte';
let message = "Copy address";
const faucetAddress ="https://sepoliafaucet.com/"
function copy() {
let address = get(ethereumAddress);
if (address == null) {
return
}
navigator.clipboard.writeText(address);
message = "Copied"
}
function goToFaucet() {
window.open(faucetAddress, "_blank");
}
</script>

<TerminalContainer>
{#if !$ethereumAddress == null}
Connect Metamask to continue
{:else}
{#if !$ethereumAddress == null}
<div>Complete the previous steps to continue</div>
{:else}
<div>Ethereum Address: <span class="text-accent">{$ethereumAddress}</span></div>
<DemoButton on:click={copy}>
{message}
</DemoButton>
<DemoButton on:click={goToFaucet}>Open Sepolia faucet</DemoButton>
{/if}
<div class="my-4">
<DemoButtonA href="https://sepoliafaucet.com/" target="_blank">Open Sepolia faucet</DemoButtonA>
</div>
{/if}
</TerminalContainer>

0 comments on commit 25cfae9

Please sign in to comment.