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"
24
24
import TokenBalance from "../../TokenBalance"
25
25
import { StakingAppName } from "../../../store/staking-applications"
26
26
import { useInitiateDeauthorization } from "../../../hooks/staking-applications"
27
+ import { getSakingAppLabel } from "../../../utils/getStakingAppLabel"
27
28
28
29
const InitiateDeauthorization : FC < {
29
30
closeModal : ( ) => void
@@ -44,7 +45,8 @@ const InitiateDeauthorization: FC<{
44
45
< ModalBody >
45
46
< InfoBox variant = "modal" >
46
47
< 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.
48
50
</ H5 >
49
51
< BodyLg >
50
52
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<
117
117
mb = { "5" }
118
118
>
119
119
{ isOperatorMappedOnlyInRandomBeacon ? (
120
- < LabelSm > tbtc app</ LabelSm >
120
+ < LabelSm > tBTC app</ LabelSm >
121
121
) : isOperatorMappedOnlyInTbtc ? (
122
122
< LabelSm > random beacon app</ LabelSm >
123
123
) : (
124
- < LabelSm > TBTC + Random Beacon apps (requires 2txs)</ LabelSm >
124
+ < LabelSm > tBTC + Random Beacon apps (requires 2txs)</ LabelSm >
125
125
) }
126
126
< StakeAddressInfo stakingProvider = { account ? account : AddressZero } />
127
127
< MapOperatorToStakingProviderForm
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import { formatTokenAmount } from "../../../utils/formatAmount"
32
32
import { ExplorerDataType } from "../../../utils/createEtherscanLink"
33
33
import { ExternalHref } from "../../../enums"
34
34
import { BaseModalProps } from "../../../types"
35
- import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppNameFromAddress "
35
+ import { getStakingAppNameFromAddress } from "../../../utils/getStakingAppLabel "
36
36
import StakingTimeline from "../../StakingTimeline"
37
37
import ButtonLink from "../../ButtonLink"
38
38
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ export const LegacyStakesDepositSteps: FC = () => {
90
90
>
91
91
< BodyMd >
92
92
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
94
94
the < Link to = "/staking" > Staking Page</ Link > and select “Configure
95
95
Stake”.
96
96
</ BodyMd >
@@ -212,7 +212,7 @@ const StakingTimeline: FC<{ statuses?: FlowStepStatus[] } & StackProps> = ({
212
212
status = { statuses [ 1 ] ?? FlowStepStatus . inactive }
213
213
>
214
214
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{ " " }
216
216
< Link to = "/staking" > Staking page</ Link > and select “Configure Stake”.
217
217
</ FlowStep >
218
218
< FlowStep
Original file line number Diff line number Diff line change @@ -124,22 +124,22 @@ const StakingApplications: PageComponent = () => {
124
124
</ Stack >
125
125
< Stack spacing = { 6 } >
126
126
< ApplicationDetailsCard
127
- preTitle = "TBTC APP"
127
+ preTitle = "tBTC APP"
128
128
title = "tBTC is the only truly decentralized solution for bridging Bitcoin to Ethereum."
129
129
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."
130
130
imgSrc = { iconMap . tbtc [ colorMode ] }
131
131
ctaButtons = {
132
132
< VStack mb = { 6 } >
133
133
< ButtonLink to = "/staking" isFullWidth >
134
- Authorize TBTC
134
+ Authorize tBTC
135
135
</ ButtonLink >
136
136
< ButtonLink
137
137
isExternal
138
138
href = { ExternalHref . tbtcNodeDocs }
139
139
isFullWidth
140
140
variant = "outline"
141
141
>
142
- TBTC Node Docs
142
+ tBTC Node Docs
143
143
</ ButtonLink >
144
144
</ VStack >
145
145
}
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ const StakeDetailsPage: FC = () => {
117
117
< StakeDetailRow label = "PRE Node Status" >
118
118
< NodeStatusLabel isAuthorized />
119
119
</ StakeDetailRow >
120
- < StakeDetailRow label = "TBTC Node Status" >
120
+ < StakeDetailRow label = "tBTC Node Status" >
121
121
< NodeStatusLabel isAuthorized = { tbtcApp . isAuthorized } />
122
122
</ StakeDetailRow >
123
123
< 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