Skip to content

Commit

Permalink
add blockexplorerlink to mempool and success
Browse files Browse the repository at this point in the history
  • Loading branch information
dni committed Jul 23, 2024
1 parent 5be3824 commit 5e2e731
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/status/TransactionClaimed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import { useNavigate } from "@solidjs/router";
import { BigNumber } from "bignumber.js";
import { Show, createEffect, createSignal } from "solid-js";

import BlockExplorer from "../components/BlockExplorer";
import LoadingSpinner from "../components/LoadingSpinner";
import { RBTC } from "../consts/Assets";
import { SwapType } from "../consts/Enums";
import { useGlobalContext } from "../context/Global";
import { usePayContext } from "../context/Pay";
import { formatAmount } from "../utils/denomination";
import { SubmarineSwap } from "../utils/swapCreator";

const Broadcasting = () => {
const { t } = useGlobalContext();

return (
<div>
<h2>{t("broadcasting_claim")}</h2>
Expand Down Expand Up @@ -59,6 +60,15 @@ const TransactionClaimed = () => {
})}
</p>
<hr />
<BlockExplorer
asset={
swap().claimTx ? swap().assetReceive : swap().assetSend
}
txId={swap().claimTx || swap().lockupTx}
address={
swap().claimAddress || (swap() as SubmarineSwap).address
}
/>
<span class="btn" onClick={() => navigate("/swap")}>
{t("new_swap")}
</span>
Expand Down
8 changes: 8 additions & 0 deletions src/status/TransactionMempool.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import BlockExplorer from "../components/BlockExplorer";
import LoadingSpinner from "../components/LoadingSpinner";
import { useGlobalContext } from "../context/Global";
import { usePayContext } from "../context/Pay";

const TransactionMempool = () => {
const { t } = useGlobalContext();
const { swap, swapStatusTransaction } = usePayContext();
return (
<div>
<h2>{t("tx_in_mempool")}</h2>
<p>{t("tx_in_mempool_subline")}</p>
<LoadingSpinner />
<BlockExplorer
asset={swap().assetSend}
txId={swapStatusTransaction()?.id}
typeLabel="lockup_tx"
/>
</div>
);
};
Expand Down

0 comments on commit 5e2e731

Please sign in to comment.