Skip to content

Commit 8940d9c

Browse files
authored
feat(vault): copy changes (#1826)
* feat(vault): copy changes * chore(pr): borrow ratio * chore(pr): nominated address * chore(pr): broadcast withdraw expired * chore(pr): update test
1 parent ffc6959 commit 8940d9c

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

services/vault/src/applications/aave/components/LoanCard/Borrow/BorrowDetailsCard/BorrowDetailsCard.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
getHealthFactorStatusFromValue,
77
} from "@/applications/aave/utils";
88
import { HeartIcon } from "@/components/shared";
9+
import { COPY } from "@/copy";
910

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

@@ -19,7 +20,8 @@ interface BorrowDetailsCardProps {
1920
}
2021

2122
/**
22-
* BorrowDetailsCard - Displays borrow rate and health factor with before → after indicators
23+
* BorrowDetailsCard - Displays borrow ratio (debt/collateral) and health factor
24+
* with before → after indicators
2325
*/
2426
export function BorrowDetailsCard({
2527
borrowRatio,
@@ -41,7 +43,7 @@ export function BorrowDetailsCard({
4143

4244
const items: KeyValueListItems = [
4345
{
44-
label: "Borrow rate",
46+
label: COPY.loans.borrowRatioLabel,
4547
value: borrowRatioOriginal ? (
4648
<span className="flex items-center gap-2">
4749
<span className="text-accent-secondary">{borrowRatioOriginal}</span>
@@ -53,7 +55,7 @@ export function BorrowDetailsCard({
5355
),
5456
},
5557
{
56-
label: "Health factor",
58+
label: COPY.loans.healthFactorLabel,
5759
value:
5860
healthFactorOriginal && originalColor ? (
5961
<span className="flex items-center gap-2">

services/vault/src/applications/aave/hooks/useAaveBorrowedAssets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface BorrowedAsset {
3131
amount: string;
3232
/** Token icon URL */
3333
icon: string;
34-
/** Borrow APR as a formatted string (e.g. "5.861%"). Optional until the
34+
/** Borrow APY as a formatted string (e.g. "5.861%"). Optional until the
3535
* reserve-data fetch that produces this is wired up. */
3636
borrowRate?: string;
3737
}

services/vault/src/copy.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const COPY = {
112112
invalid:
113113
"This BTC Vault is invalid. The BTC UTXOs were spent in a different transaction.",
114114
redemptionComplete:
115-
"Redemption complete. Your BTC has been returned to your wallet.",
115+
"Redemption complete. Your BTC payout has been sent to your nominated address.",
116116
},
117117
statusErrors: {
118118
expired:
@@ -266,8 +266,8 @@ export const COPY = {
266266
doneButton: "Done",
267267
},
268268
refundSuccess: {
269-
heading: "Broadcasting Refund",
270-
body: "Refund transaction has been broadcast successfully.",
269+
heading: "Broadcasting withdraw expired",
270+
body: "Withdraw expired vault transaction broadcast successfully.",
271271
viewExplorerButton: "View on blockchain explorer",
272272
doneButton: "Done",
273273
doNotSpendWarning: (symbol: string) =>
@@ -357,7 +357,7 @@ export const COPY = {
357357
// Accessible label / tooltip for the per-provider explorer link.
358358
providerExplorerLinkLabel: "View vault provider on explorer",
359359
splitOptionDescription:
360-
"Split your BTC into multiple BTC Vaults for more flexibility. In liquidation, only part of your collateral may be affected.",
360+
"Split your Bitcoin into multiple vaults to enable partial liquidation.",
361361
noSplitOptionDescription:
362362
"Your BTC will be deposited into a single BTC Vault",
363363
learnWhyRecommended: "Learn why we recommend this.",
@@ -616,8 +616,9 @@ export const COPY = {
616616
"Your withdrawal is going through its on-chain challenge period before the BTC payout can be broadcast.",
617617
},
618618
payoutBroadcast: {
619-
label: "BTC Sent",
620-
message: "Your BTC has been sent to your nominated address.",
619+
label: "Payout broadcast",
620+
message:
621+
"The Bitcoin payout transaction has been broadcast to your nominated address.",
621622
},
622623
payoutBlocked: {
623624
label: "Blocked",
@@ -655,7 +656,13 @@ export const COPY = {
655656
heading: "Loans",
656657
borrowButton: "Borrow",
657658
repayButton: "Repay",
658-
borrowRateLabel: "Borrow rate",
659+
// The interest rate Aave charges on the borrowed asset. Aave compounds
660+
// continuously, so this is an APY (effective rate), matching Aave's own UI.
661+
borrowRateLabel: "Borrow APY",
662+
// Detail-card metric: debt-to-collateral ratio (debtUsd / collateralUsd),
663+
// distinct from the borrow APY above.
664+
borrowRatioLabel: "Borrow ratio",
665+
healthFactorLabel: "Health factor",
659666
detailsAriaLabel: (symbol: string) => `${symbol} loan details`,
660667
empty: {
661668
title: (symbol: string) => `Borrow assets using your ${symbol}`,

services/vault/src/models/__tests__/pegoutStateMachine.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ describe("pegoutStateMachine", () => {
5252
expect(state.message.toLowerCase()).not.toContain("few hours");
5353
});
5454

55-
it("returns BTC Sent for PayoutBroadcast", () => {
55+
it("returns Payout broadcast for PayoutBroadcast", () => {
5656
const state = getPegoutDisplayState("PayoutBroadcast", true);
57-
expect(state.label).toBe("BTC Sent");
57+
expect(state.label).toBe("Payout broadcast");
5858
expect(state.variant).toBe("active");
5959
});
6060

0 commit comments

Comments
 (0)