Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 14 additions & 5 deletions src/components/Modal/StakingApplications/AuthorizeStakingApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ import {
import { BaseModalProps } from "../../../types"
import { useAuthorizeMultipleAppsTransaction } from "../../../hooks/staking-applications"
import { useAppSelector } from "../../../hooks/store"
import { selectStakingAppByStakingProvider } from "../../../store/staking-applications"
import {
selectStakingAppByStakingProvider,
StakingAppName,
} from "../../../store/staking-applications"
import { getSakingAppLabel } from "../../../utils/getStakingAppLabel"

export type AuthorizeAppsProps = BaseModalProps & {
stakingProvider: string
totalInTStake: string
applications: {
appName: string
appName: StakingAppName
address: string
authorizationAmount: string
}[]
Expand Down Expand Up @@ -106,7 +110,7 @@ const AuthorizeStakingAppsBase: FC<AuthorizeAppsProps> = ({
}

const StakingApplicationToAuth: FC<{
appName: string
appName: StakingAppName
authorizationAmount: string
stakingProvider: string
totalInTStake: string
Expand All @@ -121,10 +125,15 @@ const StakingApplicationToAuth: FC<{
<Card>
<LabelSm mb="4">
<CheckCircleIcon color="green.500" verticalAlign="top" mr="2" />
{appName} - {percentage}
{getSakingAppLabel(appName)} app - {percentage}
</LabelSm>
<BodyMd mb="3">Authorization Amount</BodyMd>
<TokenBalance tokenAmount={authorizationAmount} isLarge />
<TokenBalance
tokenAmount={authorizationAmount}
isLarge
withSymbol
tokenSymbol="T"
/>
<StakeAddressInfo stakingProvider={stakingProvider} mb="0" />
</Card>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Staking/AuthorizeStakingApps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const AuthorizeStakingAppsPage: FC = () => {
stakingProvider: stakingProviderAddress!,
totalInTStake: stake.totalInTStake,
applications: selectedApps.map((_) => ({
appName: _.label,
appName: _.stakingAppId,
address: stakinAppNameToAddress[_.stakingAppId],
authorizationAmount:
stakinAppNameToFormRef[_.stakingAppId].current?.values.tokenAmount,
Expand Down