Skip to content

Commit

Permalink
Staking: Use transaction component
Browse files Browse the repository at this point in the history
  • Loading branch information
apporc committed Sep 10, 2024
1 parent c089d67 commit 1b2658f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import AssetInput from '$lib/components/input/asset.svelte';
import Button from '$lib/components/button/button.svelte';
import Label from '$lib/components/input/label.svelte';
import Transaction from '$lib/components/transaction.svelte';
import * as m from '$lib/paraglide/messages.js';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext, untrack } from 'svelte';
Expand All @@ -22,15 +23,7 @@
</script>

{#if stakeState.txid}
<div class="space-y-4">
<h2 class="h2">Transaction Complete</h2>
<h3 class="h3">success</h3>
<p>
<a href="/{data.network}/transaction/{stakeState.txid}">
{stakeState.txid}
</a>
</p>
</div>
<Transaction network={data.network} transactionId={stakeState.txid} />
{:else if stakeState.error}
<div>
<h2 class="h2">Transaction Error</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import AssetInput from '$lib/components/input/asset.svelte';
import Button from '$lib/components/button/button.svelte';
import Label from '$lib/components/input/label.svelte';
import Transaction from '$lib/components/transaction.svelte';
import * as m from '$lib/paraglide/messages.js';
import type { UnicoveContext } from '$lib/state/client.svelte';
import { getContext } from 'svelte';
Expand All @@ -22,15 +23,7 @@
</script>

{#if unstakeState.txid}
<div class="space-y-4">
<h2 class="h2">Transaction Complete</h2>
<h3 class="h3">success</h3>
<p>
<a href="/{data.network}/transaction/{unstakeState.txid}">
{unstakeState.txid}
</a>
</p>
</div>
<Transaction network={data.network} transactionId={unstakeState.txid} />
{:else if unstakeState.error}
<div>
<h2 class="h2">Transaction Error</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import Button from '$lib/components/button/button.svelte';
import Label from '$lib/components/input/label.svelte';
import PageHeader from '$lib/components/pageheader.svelte';
import Transaction from '$lib/components/transaction.svelte';
import * as m from '$lib/paraglide/messages.js';
import type { UnicoveContext } from '$lib/state/client.svelte';
Expand All @@ -24,15 +25,7 @@
</script>

{#if withdrawState.txid}
<div class="space-y-4">
<h2 class="h2">Transaction Complete</h2>
<h3 class="h3">success</h3>
<p>
<a href="/{data.network}/transaction/{withdrawState.txid}">
{withdrawState.txid}
</a>
</p>
</div>
<Transaction network={data.network} transactionId={withdrawState.txid} />
{:else if withdrawState.error}
<div>
<h2 class="h2">Transaction Error</h2>
Expand Down

0 comments on commit 1b2658f

Please sign in to comment.