Skip to content

Commit

Permalink
feat: better TokenTransfer UI
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Oct 18, 2023
1 parent 76c5fa6 commit f93f062
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions site/src/lib/TokenTransfer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import { onMount } from 'svelte';
import type { AccountData } from '@cosmjs/amino';
import { browser } from '$app/environment';
import BlogLayout from '../mdsvex/BlogLayout.svelte';
import Error from '../routes/+error.svelte';
let accounts: null | AccountData[] = null;
Expand Down Expand Up @@ -39,10 +41,10 @@ const connect = async () => {
)
const offlineSigner = new CosmjsOfflineSigner(chainId);
accounts = await offlineSigner.getAccounts();
accounts = await offlineSigner.getAccounts();
const key = await getKey(chainId);
console.log(key)
const rpcUrl = "wss://rpc.0xc0dejug.uno"; // Populate with an RPC URL corresponding to the given chainId
const rpcUrl = "wss://rpc.0xc0dejug.uno"; // Populate with an RPC URL corresponding to the given chainId
console.log("connecting client")
let client = await Tendermint37Client.connect(rpcUrl);
console.log("creating stargate")
Expand All @@ -64,7 +66,17 @@ onMount(async () => {
</script>


<div>
{accounts}
<div class="mb-8 bg-black p-4">
{#if accounts === null}
Loading account...
{:else}
Your Union Address:

{#each accounts as account}
<div class="font-jetbrains">{account.address}</div>
{/each}

<button class="px-4 mt-4 py-2 border-2 font-jetbrains border-accent text-accent">Get UNO from faucet</button>
{/if}
</div>

0 comments on commit f93f062

Please sign in to comment.