diff --git a/frontend/src/components/CurrentPrice.tsx b/frontend/src/components/CurrentPrice.tsx
index 9f5ede7..1f754ab 100644
--- a/frontend/src/components/CurrentPrice.tsx
+++ b/frontend/src/components/CurrentPrice.tsx
@@ -12,32 +12,30 @@ export default function CurrentPrice(
priceInfo,
}: Props,
) {
- let bid = ;
- let ask = ;
- let timestamp = ;
-
- if (priceInfo) {
- bid = {priceInfo.bid} USD;
- ask = {priceInfo.ask} USD;
- timestamp = ;
- }
+ const { ask, bid, last_updated_at } = priceInfo || {};
return (
Current Price
Bid:
- {bid}
+
+ {bid} USD
+
Ask:
- {ask}
+
+ {ask} USD
+
Updated:
- {timestamp}
+
+
+
);
diff --git a/frontend/src/components/Wallet.tsx b/frontend/src/components/Wallet.tsx
index e62a59a..19ff5ba 100644
--- a/frontend/src/components/Wallet.tsx
+++ b/frontend/src/components/Wallet.tsx
@@ -14,39 +14,34 @@ export default function Wallet(
}: WalletProps,
) {
const { hasCopied, onCopy } = useClipboard(walletInfo ? walletInfo.address : "");
-
- let balance = ;
- let address = ;
- let timestamp = ;
-
- if (walletInfo) {
- balance = {walletInfo.balance} BTC;
- address = (
-
- {walletInfo.address}
- : }
- onClick={onCopy}
- />
-
- );
- timestamp = ;
- }
+ const { balance, address, last_updated_at } = walletInfo || {};
return (
Your wallet
Balance:
- {balance}
+
+ {balance} BTC
+
- {address}
+
+
+ {address}
+ : }
+ onClick={onCopy}
+ />
+
+
Updated:
- {timestamp}
+
+
+
);