From d63cb0dc2d3fbad506db984af595dac64ff2eacf Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Sun, 4 Apr 2021 15:32:07 +0800 Subject: [PATCH] Past swaps: show the amount of BTCs that we are waiting for. --- static/app-strings.json | 2 +- ui/component/walletSwap/view.jsx | 8 ++++---- ui/scss/component/_table.scss | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 0f910c7d6..c6992f8fe 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1741,7 +1741,7 @@ "Processing...": "Processing...", "View Past Swaps": "View Past Swaps", "Remove address": "Remove address", - "Waiting for BTC": "Waiting for BTC", + "Waiting %sendAmount% BTC": "Waiting %sendAmount% BTC", "Waiting to receive your bitcoin.": "Waiting to receive your bitcoin.", "Sending LBC": "Sending LBC", "Bitcoin received. Sending your LBC.": "Bitcoin received. Sending your LBC.", diff --git a/ui/component/walletSwap/view.jsx b/ui/component/walletSwap/view.jsx index 4f5bae81e..8b01bf6d4 100644 --- a/ui/component/walletSwap/view.jsx +++ b/ui/component/walletSwap/view.jsx @@ -261,8 +261,8 @@ function WalletSwap(props: Props) { }); } - function getStatusStr(btcAddress) { - const status = statusMap[btcAddress]; + function getStatusStr(coinSwap: CoinSwapInfo) { + const status = statusMap[coinSwap.sendAddress]; if (!status) { return '---'; } @@ -270,7 +270,7 @@ function WalletSwap(props: Props) { let msg; switch (status.Status) { case BTC_API_STATUS_PENDING: - msg = __('Waiting for BTC'); + msg = __('Waiting %sendAmount% BTC', { sendAmount: coinSwap.sendAmount }); break; case BTC_API_STATUS_PROCESSING: msg = __('Sending LBC'); @@ -442,7 +442,7 @@ function WalletSwap(props: Props) { }} /> - {isRefreshingStatus ? '...' : getStatusStr(x.sendAddress)} + {isRefreshingStatus ? '...' : getStatusStr(x)}