Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
getHealthFactorStatusFromValue,
} from "@/applications/aave/utils";
import { HeartIcon } from "@/components/shared";
import { COPY } from "@/copy";

type KeyValueListItems = ComponentProps<typeof KeyValueList>["items"];

Expand All @@ -19,7 +20,8 @@ interface BorrowDetailsCardProps {
}

/**
* BorrowDetailsCard - Displays borrow rate and health factor with before → after indicators
* BorrowDetailsCard - Displays borrow ratio (debt/collateral) and health factor
* with before → after indicators
*/
export function BorrowDetailsCard({
borrowRatio,
Expand All @@ -41,7 +43,7 @@ export function BorrowDetailsCard({

const items: KeyValueListItems = [
{
label: "Borrow rate",
label: COPY.loans.borrowRatioLabel,
value: borrowRatioOriginal ? (
<span className="flex items-center gap-2">
<span className="text-accent-secondary">{borrowRatioOriginal}</span>
Expand All @@ -53,7 +55,7 @@ export function BorrowDetailsCard({
),
},
{
label: "Health factor",
label: COPY.loans.healthFactorLabel,
value:
healthFactorOriginal && originalColor ? (
<span className="flex items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface BorrowedAsset {
amount: string;
/** Token icon URL */
icon: string;
/** Borrow APR as a formatted string (e.g. "5.861%"). Optional until the
/** Borrow APY as a formatted string (e.g. "5.861%"). Optional until the
* reserve-data fetch that produces this is wired up. */
borrowRate?: string;
}
Expand Down
21 changes: 14 additions & 7 deletions services/vault/src/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const COPY = {
invalid:
"This BTC Vault is invalid. The BTC UTXOs were spent in a different transaction.",
redemptionComplete:
"Redemption complete. Your BTC has been returned to your wallet.",
"Redemption complete. Your BTC payout has been sent to your nominated address.",
},
statusErrors: {
expired:
Expand Down Expand Up @@ -266,8 +266,8 @@ export const COPY = {
doneButton: "Done",
},
refundSuccess: {
heading: "Broadcasting Refund",
body: "Refund transaction has been broadcast successfully.",
heading: "Broadcasting withdraw expired",
body: "Withdraw expired vault transaction broadcast successfully.",
viewExplorerButton: "View on blockchain explorer",
doneButton: "Done",
doNotSpendWarning: (symbol: string) =>
Comment thread
gbarkhatov marked this conversation as resolved.
Expand Down Expand Up @@ -357,7 +357,7 @@ export const COPY = {
// Accessible label / tooltip for the per-provider explorer link.
providerExplorerLinkLabel: "View vault provider on explorer",
splitOptionDescription:
"Split your BTC into multiple BTC Vaults for more flexibility. In liquidation, only part of your collateral may be affected.",
"Split your Bitcoin into multiple vaults to enable partial liquidation.",
noSplitOptionDescription:
"Your BTC will be deposited into a single BTC Vault",
learnWhyRecommended: "Learn why we recommend this.",
Expand Down Expand Up @@ -616,8 +616,9 @@ export const COPY = {
"Your withdrawal is going through its on-chain challenge period before the BTC payout can be broadcast.",
},
payoutBroadcast: {
label: "BTC Sent",
message: "Your BTC has been sent to your nominated address.",
label: "Payout broadcast",
message:
"The Bitcoin payout transaction has been broadcast to your nominated address.",
},
payoutBlocked: {
label: "Blocked",
Expand Down Expand Up @@ -655,7 +656,13 @@ export const COPY = {
heading: "Loans",
borrowButton: "Borrow",
repayButton: "Repay",
borrowRateLabel: "Borrow rate",
// The interest rate Aave charges on the borrowed asset. Aave compounds
// continuously, so this is an APY (effective rate), matching Aave's own UI.
borrowRateLabel: "Borrow APY",
// Detail-card metric: debt-to-collateral ratio (debtUsd / collateralUsd),
// distinct from the borrow APY above.
borrowRatioLabel: "Borrow ratio",
healthFactorLabel: "Health factor",
detailsAriaLabel: (symbol: string) => `${symbol} loan details`,
empty: {
title: (symbol: string) => `Borrow assets using your ${symbol}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ describe("pegoutStateMachine", () => {
expect(state.message.toLowerCase()).not.toContain("few hours");
});

it("returns BTC Sent for PayoutBroadcast", () => {
it("returns Payout broadcast for PayoutBroadcast", () => {
const state = getPegoutDisplayState("PayoutBroadcast", true);
expect(state.label).toBe("BTC Sent");
expect(state.label).toBe("Payout broadcast");
expect(state.variant).toBe("active");
});

Expand Down
Loading