Skip to content

Commit

Permalink
fix: update balance to stakable balance with tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab committed Aug 16, 2024
1 parent 2757296 commit c784327
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/app/components/Summary/Summary.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { AiOutlineInfoCircle } from "react-icons/ai";
import { FaBitcoin } from "react-icons/fa";
import { Tooltip } from "react-tooltip";

import { getNetworkConfig } from "@/config/network.config";
import { satoshiToBtc } from "@/utils/btcConversions";
Expand Down Expand Up @@ -37,7 +39,7 @@ export const Summary: React.FC<SummaryProps> = ({
</div>
<div className="divider divider-horizontal xl:m-0" />
<div className="flex flex-col gap-1 text-sm xl:flex-1 xl:flex-row xl:items-center xl:justify-center xl:gap-2 xl:text-base">
<p className="dark:text-neutral-content">Balance</p>
<p className="dark:text-neutral-content">Stakable Balance</p>
<div className="flex items-center gap-1">
<FaBitcoin className="text-primary" size={16} />
{typeof btcWalletBalanceSat === "number" ? (
Expand All @@ -48,6 +50,21 @@ export const Summary: React.FC<SummaryProps> = ({
<LoadingSmall text="Loading..." />
)}
</div>
<div>
<span
className="cursor-pointer text-xs"
data-tooltip-id={"tooltip-stakeable-balance"}
data-tooltip-content={`Stakable balance only includes confirmed Bitcoin balance.
It does not include balance stemming from pending transactions.`}
data-tooltip-place="top"
>
<AiOutlineInfoCircle />
</span>
<Tooltip
id={"tooltip-stakeable-balance"}
className="tooltip-wrap"
/>
</div>
{!onMainnet && (
<a
href="https://discord.com/invite/babylonglobal"
Expand Down

0 comments on commit c784327

Please sign in to comment.