From d67613c0cfa30e119f7d2c04f391223320440410 Mon Sep 17 00:00:00 2001 From: Valtteri Karesto Date: Mon, 13 Dec 2021 22:27:21 +0200 Subject: [PATCH] Add disabled state to button if no compiled code --- components/Accounts.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/components/Accounts.tsx b/components/Accounts.tsx index 49c8a6d..285deb4 100644 --- a/components/Accounts.tsx +++ b/components/Accounts.tsx @@ -364,14 +364,28 @@ const Accounts = () => { > {account.name} - {account.address} ({account.xrp}) ({account.sequence}) + {account.address} ( + {Dinero({ + amount: Number(account?.xrp || "0"), + precision: 6, + }) + .toUnit() + .toLocaleString(undefined, { + style: "currency", + currency: "XRP", + currencyDisplay: "name", + })} + )