Skip to content

Commit 8d344df

Browse files
committed
update vaultcard
1 parent a095499 commit 8d344df

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

packages/nextjs/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { DEFAULT_ASSET_DECIMALS } from "~~/utils/sovabase";
88

99
const Home: NextPage = () => {
1010
const { address: connectedAddress } = useAccount();
11-
const { vaultSymbol, totalAssets, vaultDecimals, userBalance } = useVaultData();
11+
const { vaultSymbol, totalAssets, userAssets } = useVaultData();
1212

1313
return (
1414
<>
@@ -41,8 +41,8 @@ const Home: NextPage = () => {
4141
name="USDC Vault"
4242
symbol={vaultSymbol || ""}
4343
totalAssets={totalAssets}
44-
userBalance={connectedAddress ? userBalance : undefined}
45-
decimals={vaultDecimals}
44+
userAssets={connectedAddress ? userAssets : undefined}
45+
decimals={DEFAULT_ASSET_DECIMALS}
4646
assetDecimals={DEFAULT_ASSET_DECIMALS}
4747
href="/vault/usdc"
4848
icon="💵"
@@ -54,7 +54,7 @@ const Home: NextPage = () => {
5454
name="ETH Vault"
5555
symbol="svETH"
5656
totalAssets={undefined}
57-
userBalance={undefined}
57+
userAssets={undefined}
5858
decimals={18}
5959
assetDecimals={18}
6060
href="#"

packages/nextjs/components/sovabase/VaultCard.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface VaultCardProps {
55
name: string;
66
symbol: string;
77
totalAssets: bigint | undefined;
8-
userBalance: bigint | undefined;
8+
userAssets: bigint | undefined;
99
decimals: number | undefined;
1010
assetDecimals: number;
1111
href: string;
@@ -18,7 +18,7 @@ export const VaultCard = ({
1818
name,
1919
symbol,
2020
totalAssets,
21-
userBalance,
21+
userAssets,
2222
decimals,
2323
assetDecimals,
2424
href,
@@ -44,17 +44,21 @@ export const VaultCard = ({
4444

4545
<div className="grid grid-cols-2 gap-2">
4646
<div className="bg-base-200 rounded-lg p-2">
47-
<p className="text-xs text-base-content/60">Total Assets</p>
47+
<p className="text-xs text-base-content/60">
48+
<span className="tooltip tooltip-top tooltip-accent" data-tip="The total assets deposited in the vault">
49+
Deposits
50+
</span>
51+
</p>
4852
<p className="text-lg font-bold">{isComingSoon ? "--" : formatAmount(totalAssets, assetDecimals)}</p>
4953
<p className="text-xs text-base-content/50">{assetName}</p>
5054
</div>
5155

5256
<div className="bg-base-200 rounded-lg p-2">
5357
<p className="text-xs text-base-content/60">Your Balance</p>
5458
<p className="text-lg font-bold">
55-
{isComingSoon ? "--" : userBalance ? formatAmount(userBalance, decimals) : "0.00"}
59+
{isComingSoon ? "--" : userAssets ? formatAmount(userAssets, decimals) : "0.00"}
5660
</p>
57-
<p className="text-xs text-base-content/50">Shares</p>
61+
<p className="text-xs text-base-content/50">{assetName}</p>
5862
</div>
5963
</div>
6064

0 commit comments

Comments
 (0)