File tree Expand file tree Collapse file tree 8 files changed +33
-20
lines changed
DeauthorizeApplicationModal
MapOperatorToStakingProviderModal
HowItWorks/StakingApplications Expand file tree Collapse file tree 8 files changed +33
-20
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import shortenAddress from "../../../utils/shortenAddress"
2424import TokenBalance from "../../TokenBalance"
2525import { StakingAppName } from "../../../store/staking-applications"
2626import { useInitiateDeauthorization } from "../../../hooks/staking-applications"
27+ import { getSakingAppLabel } from "../../../utils/getStakingAppLabel"
2728
2829const 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.
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import { formatTokenAmount } from "../../../utils/formatAmount"
3232import { ExplorerDataType } from "../../../utils/createEtherscanLink"
3333import { ExternalHref } from "../../../enums"
3434import { BaseModalProps } from "../../../types"
35- import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppNameFromAddress "
35+ import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppLabel "
3636import StakingTimeline from "../../StakingTimeline"
3737import ButtonLink from "../../ButtonLink"
3838
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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" >
Original file line number Diff line number Diff line change 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+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments