From 0a4ff0c13f4fe40641ebc0dcdec078f177a49900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Wed, 24 Jul 2024 12:00:10 +0200 Subject: [PATCH] fix michael1011 review --- src/status/InvoiceFailedToPay.tsx | 2 +- src/status/InvoicePending.tsx | 12 ++++++++++++ src/status/SwapExpired.tsx | 8 ++++---- src/status/TransactionConfirmed.tsx | 12 +++++++++++- src/status/TransactionMempool.tsx | 14 +++++++++----- src/utils/boltzClient.ts | 14 ++++++++------ 6 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/status/InvoiceFailedToPay.tsx b/src/status/InvoiceFailedToPay.tsx index 87601c1d..5f342eb8 100644 --- a/src/status/InvoiceFailedToPay.tsx +++ b/src/status/InvoiceFailedToPay.tsx @@ -29,7 +29,7 @@ const InvoiceFailedToPay = () => {
); diff --git a/src/status/InvoicePending.tsx b/src/status/InvoicePending.tsx index 378ddd4b..ddcfc4d6 100644 --- a/src/status/InvoicePending.tsx +++ b/src/status/InvoicePending.tsx @@ -1,12 +1,24 @@ +import { Show } from "solid-js"; + +import BlockExplorer from "../components/BlockExplorer"; import LoadingSpinner from "../components/LoadingSpinner"; import { useGlobalContext } from "../context/Global"; +import { usePayContext } from "../context/Pay"; const InvoicePending = () => { const { t } = useGlobalContext(); + const { swap, swapStatusTransaction } = usePayContext(); return (

{t("invoice_pending")}

+ + +
); }; diff --git a/src/status/SwapExpired.tsx b/src/status/SwapExpired.tsx index 3c6188be..42c25b4e 100644 --- a/src/status/SwapExpired.tsx +++ b/src/status/SwapExpired.tsx @@ -6,7 +6,7 @@ import BlockExplorer from "../components/BlockExplorer"; import RefundButton from "../components/RefundButton"; import { useGlobalContext } from "../context/Global"; import { usePayContext } from "../context/Pay"; -import { getLockupTransaction } from "../utils/boltzClient"; +import { LockupTransaction, getLockupTransaction } from "../utils/boltzClient"; import { ChainSwap, SubmarineSwap } from "../utils/swapCreator"; const SwapExpired = () => { @@ -15,7 +15,7 @@ const SwapExpired = () => { const { t } = useGlobalContext(); const [transactionToRefund, setTransactionToRefund] = - createSignal(""); + createSignal(null); createEffect(async () => { setTransactionToRefund(null); @@ -26,7 +26,7 @@ const SwapExpired = () => { swap().type, ); log.debug(`got swap transaction for ${swap().id}`); - setTransactionToRefund(res.hex); + setTransactionToRefund(res); } catch (error: any) { log.warn(`no swap transaction for: ${swap().id}`, error); } @@ -45,7 +45,7 @@ const SwapExpired = () => {