Skip to content

Commit 7a20890

Browse files
Merge pull request #274 from threshold-network/auth-confirmation-modal-updates
Authorization confirmation modal updates Updates the authorization confirmation modal. Main changes are: - adds missing word app in the staking app card, - fixes typo RANDOMBEACON -> RANDOM BEACON, - adds missing denominator- next to the amount of T authorized the T denominator should be displayed.
2 parents 000f6c0 + 8be03c5 commit 7a20890

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

src/components/Modal/StakingApplications/AuthorizeStakingApps.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ import {
2626
import { BaseModalProps } from "../../../types"
2727
import { useAuthorizeMultipleAppsTransaction } from "../../../hooks/staking-applications"
2828
import { useAppSelector } from "../../../hooks/store"
29-
import { selectStakingAppByStakingProvider } from "../../../store/staking-applications"
29+
import {
30+
selectStakingAppByStakingProvider,
31+
StakingAppName,
32+
} from "../../../store/staking-applications"
33+
import { getSakingAppLabel } from "../../../utils/getStakingAppLabel"
3034

3135
export type AuthorizeAppsProps = BaseModalProps & {
3236
stakingProvider: string
3337
totalInTStake: string
3438
applications: {
35-
appName: string
39+
appName: StakingAppName
3640
address: string
3741
authorizationAmount: string
3842
}[]
@@ -106,7 +110,7 @@ const AuthorizeStakingAppsBase: FC<AuthorizeAppsProps> = ({
106110
}
107111

108112
const StakingApplicationToAuth: FC<{
109-
appName: string
113+
appName: StakingAppName
110114
authorizationAmount: string
111115
stakingProvider: string
112116
totalInTStake: string
@@ -121,10 +125,15 @@ const StakingApplicationToAuth: FC<{
121125
<Card>
122126
<LabelSm mb="4">
123127
<CheckCircleIcon color="green.500" verticalAlign="top" mr="2" />
124-
{appName} - {percentage}
128+
{getSakingAppLabel(appName)} app - {percentage}
125129
</LabelSm>
126130
<BodyMd mb="3">Authorization Amount</BodyMd>
127-
<TokenBalance tokenAmount={authorizationAmount} isLarge />
131+
<TokenBalance
132+
tokenAmount={authorizationAmount}
133+
isLarge
134+
withSymbol
135+
tokenSymbol="T"
136+
/>
128137
<StakeAddressInfo stakingProvider={stakingProvider} mb="0" />
129138
</Card>
130139
)

src/pages/Staking/AuthorizeStakingApps/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ const AuthorizeStakingAppsPage: FC = () => {
178178
stakingProvider: stakingProviderAddress!,
179179
totalInTStake: stake.totalInTStake,
180180
applications: selectedApps.map((_) => ({
181-
appName: _.label,
181+
appName: _.stakingAppId,
182182
address: stakinAppNameToAddress[_.stakingAppId],
183183
authorizationAmount:
184184
stakinAppNameToFormRef[_.stakingAppId].current?.values.tokenAmount,

0 commit comments

Comments
 (0)