Skip to content

Commit 4b4e1fe

Browse files
Merge pull request #273 from threshold-network/copy-update-tbtc
Update copy: tBTC The convention should be tBTC in every case.
2 parents 7183c4c + 31d3a21 commit 4b4e1fe

File tree

8 files changed

+33
-20
lines changed

8 files changed

+33
-20
lines changed

src/components/Modal/DeauthorizeApplicationModal/InititateDeauthorization.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import shortenAddress from "../../../utils/shortenAddress"
2424
import TokenBalance from "../../TokenBalance"
2525
import { StakingAppName } from "../../../store/staking-applications"
2626
import { useInitiateDeauthorization } from "../../../hooks/staking-applications"
27+
import { getSakingAppLabel } from "../../../utils/getStakingAppLabel"
2728

2829
const InitiateDeauthorization: FC<{
2930
closeModal: () => void
@@ -44,7 +45,8 @@ const InitiateDeauthorization: FC<{
4445
<ModalBody>
4546
<InfoBox variant="modal">
4647
<H5 mb={4}>
47-
You're about to initiate the decrease of your TBTC authoriation.
48+
You're about to initiate the decrease of your{" "}
49+
{getSakingAppLabel(stakingAppName)} authorization.
4850
</H5>
4951
<BodyLg>
5052
Initiation and confirmation of deauthorization is a two step action.

src/components/Modal/MapOperatorToStakingProviderModal/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ const MapOperatorToStakingProviderModal: FC<
117117
mb={"5"}
118118
>
119119
{isOperatorMappedOnlyInRandomBeacon ? (
120-
<LabelSm>tbtc app</LabelSm>
120+
<LabelSm>tBTC app</LabelSm>
121121
) : isOperatorMappedOnlyInTbtc ? (
122122
<LabelSm>random beacon app</LabelSm>
123123
) : (
124-
<LabelSm>TBTC + Random Beacon apps (requires 2txs)</LabelSm>
124+
<LabelSm>tBTC + Random Beacon apps (requires 2txs)</LabelSm>
125125
)}
126126
<StakeAddressInfo stakingProvider={account ? account : AddressZero} />
127127
<MapOperatorToStakingProviderForm

src/components/Modal/StakingApplications/StakingApplicationsAuthorized.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { formatTokenAmount } from "../../../utils/formatAmount"
3232
import { ExplorerDataType } from "../../../utils/createEtherscanLink"
3333
import { ExternalHref } from "../../../enums"
3434
import { BaseModalProps } from "../../../types"
35-
import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppNameFromAddress"
35+
import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppLabel"
3636
import StakingTimeline from "../../StakingTimeline"
3737
import ButtonLink from "../../ButtonLink"
3838

src/components/StakingTimeline/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const LegacyStakesDepositSteps: FC = () => {
9090
>
9191
<BodyMd>
9292
For each stake, there are three applications available. PRE does not
93-
require authorization. To authorize TBTC and Random Beacon, go to
93+
require authorization. To authorize tBTC and Random Beacon, go to
9494
the <Link to="/staking">Staking Page</Link> and select “Configure
9595
Stake”.
9696
</BodyMd>
@@ -212,7 +212,7 @@ const StakingTimeline: FC<{ statuses?: FlowStepStatus[] } & StackProps> = ({
212212
status={statuses[1] ?? FlowStepStatus.inactive}
213213
>
214214
For each stake, there are three applications available. PRE does not
215-
require authorization. To authorize TBTC and Random Beacon, go to the{" "}
215+
require authorization. To authorize tBTC and Random Beacon, go to the{" "}
216216
<Link to="/staking">Staking page</Link> and select “Configure Stake”.
217217
</FlowStep>
218218
<FlowStep

src/pages/Staking/HowItWorks/StakingApplications/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,22 +124,22 @@ const StakingApplications: PageComponent = () => {
124124
</Stack>
125125
<Stack spacing={6}>
126126
<ApplicationDetailsCard
127-
preTitle="TBTC APP"
127+
preTitle="tBTC APP"
128128
title="tBTC is the only truly decentralized solution for bridging Bitcoin to Ethereum."
129129
description="tBTC replaces a centralized custodian with a randomly selected group of operators running nodes on the Threshold Network. This group of independent operators works together to secure your deposited Bitcoin through threshold cryptography."
130130
imgSrc={iconMap.tbtc[colorMode]}
131131
ctaButtons={
132132
<VStack mb={6}>
133133
<ButtonLink to="/staking" isFullWidth>
134-
Authorize TBTC
134+
Authorize tBTC
135135
</ButtonLink>
136136
<ButtonLink
137137
isExternal
138138
href={ExternalHref.tbtcNodeDocs}
139139
isFullWidth
140140
variant="outline"
141141
>
142-
TBTC Node Docs
142+
tBTC Node Docs
143143
</ButtonLink>
144144
</VStack>
145145
}

src/pages/Staking/StakeDetailsPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const StakeDetailsPage: FC = () => {
117117
<StakeDetailRow label="PRE Node Status">
118118
<NodeStatusLabel isAuthorized />
119119
</StakeDetailRow>
120-
<StakeDetailRow label="TBTC Node Status">
120+
<StakeDetailRow label="tBTC Node Status">
121121
<NodeStatusLabel isAuthorized={tbtcApp.isAuthorized} />
122122
</StakeDetailRow>
123123
<StakeDetailRow label="Random Beacon Node Status">

src/utils/getStakingAppLabel.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { threshold } from "./getThresholdLib"
2+
import { StakingAppName } from "../store/staking-applications"
3+
4+
const stakingAppNameToAppLabel: Record<StakingAppName, string> = {
5+
tbtc: "tBTC",
6+
randomBeacon: "Random Beacon",
7+
}
8+
9+
const stakingAppAddressToName: { [key: string]: string } = {
10+
[threshold.multiAppStaking.ecdsa.address]: stakingAppNameToAppLabel.tbtc,
11+
[threshold.multiAppStaking.randomBeacon.address]:
12+
stakingAppNameToAppLabel.randomBeacon,
13+
}
14+
15+
export const getStakingAppNameFromAddress = (stakingAppAddress: string) => {
16+
return stakingAppAddressToName[stakingAppAddress] ?? "App"
17+
}
18+
19+
export const getSakingAppLabel = (stakingAppName: StakingAppName) => {
20+
return stakingAppNameToAppLabel[stakingAppName]
21+
}

src/utils/getStakingAppNameFromAddress.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)