feat: swap successScreen now shows balance + reserve

This commit is contained in:
benalleng
2023-08-03 10:51:55 -04:00
committed by Paul Miller
parent f78d7afddf
commit 11eb576934
2 changed files with 21 additions and 7 deletions

View File

@@ -409,7 +409,7 @@ export default {
insufficient_funds: "You don't have enough funds to make this channel",
header: "Swap to Lightning",
initiated: "Swap Initiated",
sats_added: "sats will be added to your Lightning balance",
sats_added: "+{{amount}} sats will be added to your Lightning balance",
use_existing: "Use existing peer",
choose_peer: "Choose a peer",
peer_connect_label: "Connect to new peer",

View File

@@ -297,16 +297,30 @@ export default function Swap() {
{i18n.t("swap.initiated")}
</h1>
<p class="text-xl text-center">
+
{channelOpenResult()?.channel?.balance.toLocaleString() ??
"0"}{" "}
{i18n.t("swap.sats_added")}
{i18n.t("swap.sats_added", {
amount: (
Number(
channelOpenResult()?.channel
?.balance
) +
Number(
channelOpenResult()?.channel
?.reserve
)
).toLocaleString()
})}
</p>
<div class="text-sm text-center text-white/70">
<AmountFiat
amountSats={
channelOpenResult()?.channel
?.balance
Number(
channelOpenResult()?.channel
?.balance
) +
Number(
channelOpenResult()?.channel
?.reserve
)
}
/>
</div>