Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update copy: tBTC #273

Merged
merged 3 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -25,6 +25,11 @@ import TokenBalance from "../../TokenBalance"
import { StakingAppName } from "../../../store/staking-applications"
import { useInitiateDeauthorization } from "../../../hooks/staking-applications"

const stakingAppNameToAppLabel: Record<StakingAppName, string> = {
tbtc: "tBTC",
randomBeacon: "Random Beacon",
}
michalsmiarowski marked this conversation as resolved.
Show resolved Hide resolved

const InitiateDeauthorization: FC<{
closeModal: () => void
stakingProvider: string
Expand All @@ -44,7 +49,8 @@ const InitiateDeauthorization: FC<{
<ModalBody>
<InfoBox variant="modal">
<H5 mb={4}>
You're about to initiate the decrease of your TBTC authoriation.
You're about to initiate the decrease of your{" "}
{stakingAppNameToAppLabel[stakingAppName]} authorization.
</H5>
<BodyLg>
Initiation and confirmation of deauthorization is a two step action.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ const MapOperatorToStakingProviderModal: FC<BaseModalProps> = () => {
mb={"5"}
>
{isOperatorMappedOnlyInRandomBeacon ? (
<LabelSm>tbtc app</LabelSm>
<LabelSm>tBTC app</LabelSm>
) : isOperatorMappedOnlyInTbtc ? (
<LabelSm>random beacon app</LabelSm>
) : (
<LabelSm>TBTC + Random Beacon apps (requires 2txs)</LabelSm>
<LabelSm>tBTC + Random Beacon apps (requires 2txs)</LabelSm>
)}
<StakeAddressInfo stakingProvider={account ? account : AddressZero} />
<MapOperatorToStakingProviderForm
Expand Down
4 changes: 2 additions & 2 deletions src/components/StakingTimeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const LegacyStakesDepositSteps: FC = () => {
>
<BodyMd>
For each stake, there are three applications available. PRE does not
require authorization. To authorize TBTC and Random Beacon, go to
require authorization. To authorize tBTC and Random Beacon, go to
the <InternalLink to="/staking">Staking Page</InternalLink> and
select “Configure Stake”.
</BodyMd>
Expand Down Expand Up @@ -228,7 +228,7 @@ const StakingTimeline: FC<{ statuses?: FlowStepStatus[] } & StackProps> = ({
status={statuses[1] ?? FlowStepStatus.inactive}
>
For each stake, there are three applications available. PRE does not
require authorization. To authorize TBTC and Random Beacon, go to the{" "}
require authorization. To authorize tBTC and Random Beacon, go to the{" "}
<InternalLink to="/staking">Staking page</InternalLink> and select
“Configure Stake”.
</FlowStep>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Staking/HowItWorks/StakingApplications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ const StakingApplications: PageComponent = () => {
to="/staking"
width="full"
>
Authorize TBTC
Authorize tBTC
</Button>
<Button
as={ExternalLink}
textDecoration="none"
href={ExternalHref.tbtcNodeDocs}
width="full"
variant="outline"
text="TBTC Node Docs"
text="tBTC Node Docs"
/>
</VStack>
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Staking/StakeDetailsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const StakeDetailsPage: FC = () => {
<StakeDetailRow label="PRE Node Status">
<NodeStatusLabel isAuthorized />
</StakeDetailRow>
<StakeDetailRow label="TBTC Node Status">
<StakeDetailRow label="tBTC Node Status">
<NodeStatusLabel isAuthorized={tbtcApp.isAuthorized} />
</StakeDetailRow>
<StakeDetailRow label="Random Beacon Node Status">
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getStakingAppNameFromAddress.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { threshold } from "./getThresholdLib"

const stakingAppAddressToName: { [key: string]: string } = {
[threshold.multiAppStaking.ecdsa.address]: "TBTC",
[threshold.multiAppStaking.ecdsa.address]: "tBTC",
[threshold.multiAppStaking.randomBeacon.address]: "Random Beacon",
}

Expand Down