diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx
index 51ec99bbaa..fabea93b81 100644
--- a/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx
@@ -48,7 +48,7 @@ export const TokenItem = ({
style={[styles.sentTokenItem, !isPrimaryToken && styles.notPrimarySentTokenItem]}
disabled={isPrimaryToken}
>
- -{label}
+ {label}
)
}
diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useFormattedTx.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useFormattedTx.tsx
index 91ef9f2d30..e01bdae3ea 100644
--- a/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useFormattedTx.tsx
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useFormattedTx.tsx
@@ -51,7 +51,12 @@ export const useFormattedTx = (data: TransactionBody): FormattedTx => {
const formattedOutputs = useFormattedOutputs(wallet, outputs, portfolioTokenInfos)
const formattedFee = formatFee(wallet, data)
- return {inputs: formattedInputs, outputs: formattedOutputs, fee: formattedFee}
+ return {
+ inputs: formattedInputs,
+ outputs: formattedOutputs,
+ fee: formattedFee,
+ certificates: data.certs ?? null,
+ }
}
export const useFormattedInputs = (
diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useStrings.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useStrings.tsx
index b6e245d124..3858509fab 100644
--- a/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useStrings.tsx
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useStrings.tsx
@@ -35,6 +35,11 @@ export const useStrings = () => {
description: intl.formatMessage(messages.description),
details: intl.formatMessage(messages.details),
tokenDetailsTitle: intl.formatMessage(messages.tokenDetailsTitle),
+ registerStakingKey: intl.formatMessage(messages.registerStakingKey),
+ selectAbstain: intl.formatMessage(messages.selectAbstain),
+ selectNoConfidence: intl.formatMessage(messages.selectNoConfidence),
+ delegateVotingToDRep: intl.formatMessage(messages.delegateVotingToDRep),
+ delegateStake: intl.formatMessage(messages.delegateStake),
}
}
@@ -151,4 +156,24 @@ const messages = defineMessages({
id: 'txReview.tokenDetails.title',
defaultMessage: '!!!Asset Details',
},
+ registerStakingKey: {
+ id: 'txReview.operations.registerStakingKey',
+ defaultMessage: '!!!Register staking key deposit',
+ },
+ selectAbstain: {
+ id: 'txReview.operations.selectAbstain',
+ defaultMessage: '!!!Select abstain',
+ },
+ selectNoConfidence: {
+ id: 'txReview.operations.selectNoConfidence',
+ defaultMessage: '!!!Select no confidence',
+ },
+ delegateVotingToDRep: {
+ id: 'txReview.operations.delegateVotingToDRep',
+ defaultMessage: '!!!Delegate voting to',
+ },
+ delegateStake: {
+ id: 'txReview.operations.delegateStake',
+ defaultMessage: '!!!Stake entire wallet balance to',
+ },
})
diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/operations.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/operations.tsx
new file mode 100644
index 0000000000..37e67650b2
--- /dev/null
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/operations.tsx
@@ -0,0 +1,140 @@
+import {PoolInfoApi} from '@emurgo/yoroi-lib'
+import {useBech32DRepID} from '@yoroi/staking'
+import {useTheme} from '@yoroi/theme'
+import * as React from 'react'
+import {Linking, StyleSheet, Text, View} from 'react-native'
+import {TouchableOpacity} from 'react-native-gesture-handler'
+import {useQuery} from 'react-query'
+
+import {Space} from '../../../components/Space/Space'
+import {getPoolBech32Id} from '../../../yoroi-wallets/cardano/delegationUtils'
+import {formatTokenWithText} from '../../../yoroi-wallets/utils/format'
+import {asQuantity} from '../../../yoroi-wallets/utils/utils'
+import {useSelectedNetwork} from '../../WalletManager/common/hooks/useSelectedNetwork'
+import {useSelectedWallet} from '../../WalletManager/common/hooks/useSelectedWallet'
+import {useStrings} from './hooks/useStrings'
+
+export const RegisterStakingKeyOperation = () => {
+ const {styles} = useStyles()
+ const strings = useStrings()
+ const {wallet} = useSelectedWallet()
+
+ return (
+
+ {strings.registerStakingKey}
+
+
+
+
+ {formatTokenWithText(asQuantity(wallet.protocolParams.keyDeposit), wallet.portfolioPrimaryTokenInfo)}
+
+
+ )
+}
+export const DelegateStakeOperation = ({poolId}: {poolId: string}) => {
+ const {styles} = useStyles()
+ const strings = useStrings()
+ const poolInfo = usePoolInfo({poolId})
+ const {networkManager} = useSelectedNetwork()
+
+ const poolInfoText = poolInfo != null ? `[${poolInfo.ticker}] ${poolInfo.name}` : poolId
+
+ return (
+
+ {strings.delegateStake}
+
+
+
+ Linking.openURL(networkManager.explorers.cardanoscan.pool(poolId))}
+ >
+ {poolInfoText}
+
+
+ )
+}
+
+export const usePoolInfo = ({poolId}: {poolId: string}) => {
+ const {networkManager} = useSelectedNetwork()
+ const poolInfoApi = React.useMemo(
+ () => new PoolInfoApi(networkManager.legacyApiBaseUrl),
+ [networkManager.legacyApiBaseUrl],
+ )
+ const poolInfo = useQuery({
+ queryKey: ['usePoolInfoStakeOperation', poolId],
+ queryFn: async () => {
+ const poolBech32Id = await getPoolBech32Id(poolId)
+ return poolInfoApi.getSingleExplorerPoolInfo(poolBech32Id)
+ },
+ })
+
+ return poolInfo?.data ?? null
+}
+
+export const AbstainOperation = () => {
+ const {styles} = useStyles()
+ const strings = useStrings()
+
+ return (
+
+ {strings.selectAbstain}
+
+ )
+}
+
+export const NoConfidenceOperation = () => {
+ const {styles} = useStyles()
+ const strings = useStrings()
+
+ return (
+
+ {strings.selectNoConfidence}
+
+ )
+}
+
+export const DelegateVotingToDrepOperation = ({drepID}: {drepID: string}) => {
+ const {styles} = useStyles()
+ const strings = useStrings()
+
+ const {data: bech32DrepId} = useBech32DRepID(drepID)
+
+ return (
+
+ {strings.delegateVotingToDRep}
+
+
+
+ {bech32DrepId ?? drepID}
+
+ )
+}
+
+const useStyles = () => {
+ const {color, atoms} = useTheme()
+
+ const styles = StyleSheet.create({
+ operation: {
+ ...atoms.flex_row,
+ ...atoms.justify_between,
+ ...atoms.align_start,
+ },
+ operationLabel: {
+ ...atoms.body_2_md_regular,
+ color: color.text_gray_low,
+ },
+ operationValue: {
+ ...atoms.flex_1,
+ ...atoms.text_right,
+ ...atoms.body_2_md_regular,
+ color: color.text_gray_medium,
+ },
+ operationLink: {
+ ...atoms.body_2_md_regular,
+ color: color.text_primary_medium,
+ },
+ })
+
+ return {styles} as const
+}
diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/types.ts b/apps/wallet-mobile/src/features/ReviewTx/common/types.ts
index 04cf6aec6d..f06f1d2530 100644
--- a/apps/wallet-mobile/src/features/ReviewTx/common/types.ts
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/types.ts
@@ -1,4 +1,5 @@
import {
+ CertificatesJSON,
TransactionBodyJSON,
TransactionInputsJSON,
TransactionOutputsJSON,
@@ -56,9 +57,12 @@ export type FormattedTx = {
inputs: FormattedInputs
outputs: FormattedOutputs
fee: FormattedFee
+ certificates: Certificates
}
export type FormattedMetadata = {
hash: string | null
metadata: {msg: Array} | null
}
+
+export type Certificates = CertificatesJSON | null
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx b/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx
index 6a838019e9..b8ec96328e 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx
+++ b/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx
@@ -4,30 +4,29 @@ import {
governanceApiMaker,
governanceManagerMaker,
GovernanceProvider,
- useBech32DRepID,
useGovernance,
useStakingKeyState,
useUpdateLatestGovernanceAction,
} from '@yoroi/staking'
-import {useTheme} from '@yoroi/theme'
import * as React from 'react'
-import {StyleSheet, Text, View} from 'react-native'
-import {Space} from '../../../../components/Space/Space'
import {governaceAfterBlock} from '../../../../kernel/config'
import {useWalletNavigation} from '../../../../kernel/navigation'
import {YoroiWallet} from '../../../../yoroi-wallets/cardano/types'
import {useStakingKey} from '../../../../yoroi-wallets/hooks'
import {YoroiUnsignedTx} from '../../../../yoroi-wallets/types/yoroi'
-import {formatTokenWithText} from '../../../../yoroi-wallets/utils/format'
-import {asQuantity} from '../../../../yoroi-wallets/utils/utils'
import {CardanoMobile} from '../../../../yoroi-wallets/wallets'
+import {
+ AbstainOperation,
+ DelegateVotingToDrepOperation,
+ NoConfidenceOperation,
+ RegisterStakingKeyOperation,
+} from '../../../ReviewTx/common/operations'
import {useReviewTx} from '../../../ReviewTx/common/ReviewTxProvider'
import {useBestBlock} from '../../../WalletManager/common/hooks/useBestBlock'
import {useSelectedWallet} from '../../../WalletManager/common/hooks/useSelectedWallet'
import {GovernanceVote} from '../types'
import {useNavigateTo} from './navigation'
-import {useStrings} from './strings'
export const useIsParticipatingInGovernance = (wallet: YoroiWallet) => {
const stakingKeyHash = useStakingKey(wallet)
@@ -100,7 +99,7 @@ export const useGovernanceActions = () => {
}) => {
let operations = [
-
+
,
]
@@ -177,84 +176,3 @@ export const useGovernanceActions = () => {
return {handleDelegateAction, handleAbstainAction, handleNoConfidenceAction} as const
}
-
-const RegisterStakingKeyOperation = () => {
- const {styles} = useStyles()
- const strings = useStrings()
- const {wallet} = useSelectedWallet()
-
- return (
-
- {strings.registerStakingKey}
-
-
-
-
- {formatTokenWithText(asQuantity(wallet.protocolParams.keyDeposit), wallet.portfolioPrimaryTokenInfo)}
-
-
- )
-}
-
-const AbstainOperation = () => {
- const {styles} = useStyles()
- const strings = useStrings()
-
- return (
-
- {strings.selectAbstain}
-
- )
-}
-
-const NoConfidenceOperation = () => {
- const {styles} = useStyles()
- const strings = useStrings()
-
- return (
-
- {strings.selectNoConfidence}
-
- )
-}
-
-const DelegateOperation = ({drepID}: {drepID: string}) => {
- const {styles} = useStyles()
- const strings = useStrings()
-
- const {data: bech32DrepId} = useBech32DRepID(drepID)
-
- return (
-
- {strings.delegateVotingToDRep}
-
-
-
- {bech32DrepId ?? drepID}
-
- )
-}
-
-const useStyles = () => {
- const {color, atoms} = useTheme()
-
- const styles = StyleSheet.create({
- operation: {
- ...atoms.flex_row,
- ...atoms.justify_between,
- ...atoms.align_start,
- },
- operationLabel: {
- ...atoms.body_2_md_regular,
- color: color.text_gray_low,
- },
- operationValue: {
- ...atoms.flex_1,
- ...atoms.text_right,
- ...atoms.body_2_md_regular,
- color: color.text_gray_medium,
- },
- })
-
- return {styles} as const
-}
diff --git a/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json b/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
index eb9f6b47dd..caeffe72a9 100644
--- a/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
+++ b/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
@@ -1246,5 +1246,10 @@
"txReview.tokenDetails.overViewTab.symbol.label": "Symbol",
"txReview.tokenDetails.overViewTab.description.label": "Description",
"txReview.tokenDetails.overViewTab.details.label": "Details on",
- "txReview.tokenDetails.title": "Asset Details"
+ "txReview.tokenDetails.title": "Asset Details",
+ "txReview.operations.registerStakingKey": "Register staking key deposit",
+ "txReview.operations.selectAbstain": "Select abstain",
+ "txReview.operations.selectNoConfidence": "Select no confidence",
+ "txReview.operations.delegateVotingToDRep": "Delegate voting to",
+ "txReview.operations.delegateStake": "Stake entire wallet balance to"
}
diff --git a/apps/wallet-mobile/src/kernel/navigation.tsx b/apps/wallet-mobile/src/kernel/navigation.tsx
index 6d960cb8e0..50691d8b91 100644
--- a/apps/wallet-mobile/src/kernel/navigation.tsx
+++ b/apps/wallet-mobile/src/kernel/navigation.tsx
@@ -9,7 +9,6 @@ import {Dimensions, Platform, TouchableOpacity, TouchableOpacityProps, View} fro
import {Icon} from '../components/Icon'
import {Routes as StakingGovernanceRoutes} from '../features/Staking/Governance/common/navigation'
-import {YoroiUnsignedTx} from '../yoroi-wallets/types/yoroi'
// prettier-ignore
export const useUnsafeParams = () => {
@@ -190,10 +189,6 @@ export type SwapTokenRouteseNavigation = StackNavigationProp
export type StakingCenterRoutes = {
'staking-center-main': undefined
- 'delegation-confirmation': {
- poolId: string
- yoroiUnsignedTx: YoroiUnsignedTx
- }
'delegation-failed-tx': undefined
}
@@ -273,10 +268,6 @@ export type BrowserRoutes = {
export type DashboardRoutes = {
'staking-dashboard-main': undefined
'staking-center': NavigatorScreenParams
- 'delegation-confirmation': {
- poolId: string
- yoroiUnsignedTx: YoroiUnsignedTx
- }
'delegation-failed-tx': undefined
}
diff --git a/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx b/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx
index 9e579faaa1..f536b3ffd7 100644
--- a/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx
+++ b/apps/wallet-mobile/src/legacy/Dashboard/DashboardNavigator.tsx
@@ -9,7 +9,6 @@ import {NetworkTag} from '../../features/Settings/useCases/changeAppSettings/Cha
import {useGovernanceManagerMaker} from '../../features/Staking/Governance/common/helpers'
import {useSelectedWallet} from '../../features/WalletManager/common/hooks/useSelectedWallet'
import {DashboardRoutes, defaultStackNavigationOptions} from '../../kernel/navigation'
-import {DelegationConfirmation} from '../Staking/DelegationConfirmation'
import {FailedTxScreen} from '../Staking/FailedTx/FailedTxScreen'
import {StakingCenter} from '../Staking/StakingCenter'
import {Dashboard} from './Dashboard'
@@ -44,8 +43,6 @@ export const DashboardNavigator = () => {
component={StakingCenter}
/>
-
-
diff --git a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.stories.tsx b/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.stories.tsx
deleted file mode 100644
index 52bd0458c5..0000000000
--- a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.stories.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import {storiesOf} from '@storybook/react-native'
-import React from 'react'
-import {QueryClient, QueryClientProvider} from 'react-query'
-
-import {RouteProvider} from '../../../../.storybook/decorators'
-import {StakingCenterRoutes} from '../../../kernel/navigation'
-import {mocks} from '../../../yoroi-wallets/mocks/wallet'
-import {WalletManagerProviderMock} from '../../../yoroi-wallets/mocks/WalletManagerProviderMock'
-import {DelegationConfirmation} from './DelegationConfirmation'
-
-storiesOf('DelegationConfirmation', module)
- .add('Default', () => (
-
-
-
-
-
-
-
- ))
- .add('loading', () => (
-
-
-
-
-
-
-
- ))
- .add('error', () => (
-
-
-
-
-
-
-
- ))
-
-const params: StakingCenterRoutes['delegation-confirmation'] = {
- poolId: '6777ed5eac05ab8bf55d073424132e200935c8d3be62fb00f5252cd27a9fe6e5',
- yoroiUnsignedTx: {
- ...mocks.yoroiUnsignedTx,
- staking: {
- registrations: [],
- deregistrations: [],
- delegations: [{address: 'rewardAddress', amounts: {'.': '123456789'}}],
- withdrawals: [],
- },
- },
-}
diff --git a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.tsx b/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.tsx
deleted file mode 100644
index a55acad821..0000000000
--- a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/DelegationConfirmation.tsx
+++ /dev/null
@@ -1,203 +0,0 @@
-import {useTheme} from '@yoroi/theme'
-import React, {useEffect, useState} from 'react'
-import {defineMessages, useIntl} from 'react-intl'
-import {Platform, ScrollView, StyleSheet, View} from 'react-native'
-import {useQueryClient} from 'react-query'
-
-import {ConfirmTx} from '../../../components/ConfirmTx/ConfirmTx'
-import {KeyboardSpacer} from '../../../components/KeyboardSpacer'
-import {Space} from '../../../components/Space/Space'
-import {Text} from '../../../components/Text'
-import {ValidatedTextInput} from '../../../components/ValidatedTextInput'
-import {useSelectedWallet} from '../../../features/WalletManager/common/hooks/useSelectedWallet'
-import {debugWalletInfo, features} from '../../../kernel/features'
-import globalMessages, {txLabels} from '../../../kernel/i18n/global-messages'
-import {StakingCenterRoutes, useParams, useWalletNavigation} from '../../../kernel/navigation'
-import {formatTokenAmount} from '../../../yoroi-wallets/utils/format'
-import {Amounts, Entries} from '../../../yoroi-wallets/utils/utils'
-import {useStakePoolInfoAndHistory} from '../../Dashboard/StakePoolInfo'
-import {Instructions as HWInstructions} from '../../HW'
-
-type Params = StakingCenterRoutes['delegation-confirmation']
-
-const isParams = (params?: Params | object | undefined): params is Params => {
- return (
- !!params &&
- 'yoroiUnsignedTx' in params &&
- typeof params.yoroiUnsignedTx === 'object' &&
- 'poolId' in params &&
- typeof params.poolId === 'string'
- )
-}
-
-export const DelegationConfirmation = () => {
- const {resetToTxHistory} = useWalletNavigation()
- const {wallet, meta} = useSelectedWallet()
- const strings = useStrings()
- const styles = useStyles()
- const queryClient = useQueryClient()
-
- const {poolId, yoroiUnsignedTx} = useParams(isParams)
-
- if (!yoroiUnsignedTx.staking?.delegations) throw new Error('invalid transaction')
- const stakingAmount = Amounts.getAmount(
- Entries.toAmounts(yoroiUnsignedTx.staking.delegations),
- wallet.portfolioPrimaryTokenInfo.id,
- )
- const [password, setPassword] = useState('')
- const [useUSB, setUseUSB] = useState(false)
-
- useEffect(() => {
- if (features.prefillWalletInfo && __DEV__) setPassword(debugWalletInfo.PASSWORD)
- }, [])
-
- const onSuccess = () => {
- queryClient.resetQueries([wallet.id, 'stakingInfo'])
- resetToTxHistory()
- }
-
- const fee = formatTokenAmount(
- yoroiUnsignedTx.fee[wallet.portfolioPrimaryTokenInfo.id],
- wallet.portfolioPrimaryTokenInfo,
- )
-
- return (
-
-
-
- {strings.stakePoolName}
-
-
-
-
-
- {strings.stakePoolHash}
-
-
- {poolId}
-
-
-
-
-
- {`+ ${fee} ${strings.ofFees}`}
-
-
- {/* requires a handler so we pass on a dummy function */}
-
- undefined}
- editable={false}
- value={formatTokenAmount(stakingAmount.quantity, wallet.portfolioPrimaryTokenInfo)}
- label={strings.amount}
- />
-
-
- {!meta.isEasyConfirmationEnabled && !meta.isHW && (
-
-
-
- )}
-
-
- {strings.rewardsExplanation}
-
-
- {meta.isHW && }
-
-
-
-
-
-
- {/* hack to fix weird KeyboardAvoidingView bug in THIS SCREEN */}
- {Platform.OS === 'ios' && }
-
- )
-}
-
-const StakePoolName = ({stakePoolId}: {stakePoolId: string}) => {
- const strings = useStrings()
- const styles = useStyles()
- const {wallet} = useSelectedWallet()
- const {stakePoolInfoAndHistory, isLoading, error} = useStakePoolInfoAndHistory({wallet, stakePoolId})
-
- return (
-
- {isLoading ? '...' : error ? strings.unknownPool : stakePoolInfoAndHistory?.info.name}
-
- )
-}
-
-const useStyles = () => {
- const {atoms, color} = useTheme()
- const styles = StyleSheet.create({
- container: {
- backgroundColor: color.bg_color_max,
- ...atoms.px_lg,
- ...atoms.pb_2xl,
- flex: 1,
- },
- itemBlock: {
- ...atoms.pt_2xl,
- },
- heading: {
- color: color.gray_900,
- ...atoms.body_1_lg_medium,
- },
- text: {
- color: color.gray_900,
- ...atoms.body_2_md_regular,
- },
- fees: {
- textAlign: 'right',
- color: color.gray_900,
- },
- })
- return styles
-}
-
-const useStrings = () => {
- const intl = useIntl()
-
- return {
- stakePoolName: intl.formatMessage(globalMessages.stakePoolName),
- stakePoolHash: intl.formatMessage(globalMessages.stakePoolHash),
- ofFees: intl.formatMessage(messages.ofFees),
- amount: intl.formatMessage(txLabels.amount),
- password: intl.formatMessage(txLabels.password),
- rewardsExplanation: intl.formatMessage(messages.rewardsExplanation),
- delegateButtonLabel: intl.formatMessage(messages.delegateButtonLabel),
- unknownPool: intl.formatMessage(messages.unknownPool),
- }
-}
-
-const messages = defineMessages({
- delegateButtonLabel: {
- id: 'components.stakingcenter.confirmDelegation.delegateButtonLabel',
- defaultMessage: '!!!Delegate',
- },
- ofFees: {
- id: 'components.stakingcenter.confirmDelegation.ofFees',
- defaultMessage: '!!!of fees',
- },
- rewardsExplanation: {
- id: 'components.stakingcenter.confirmDelegation.rewardsExplanation',
- defaultMessage: '!!!Current approximation of rewards that you will receive per epoch:',
- },
- unknownPool: {
- id: 'components.delegationsummary.delegatedStakepoolInfo.unknownPool',
- defaultMessage: '!!!Unknown pool',
- },
-})
diff --git a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/index.ts b/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/index.ts
deleted file mode 100644
index 3007ac4817..0000000000
--- a/apps/wallet-mobile/src/legacy/Staking/DelegationConfirmation/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './DelegationConfirmation'
diff --git a/apps/wallet-mobile/src/legacy/Staking/PoolTransition/usePoolTransition.tsx b/apps/wallet-mobile/src/legacy/Staking/PoolTransition/usePoolTransition.tsx
index 65cebf2c76..d6bd535031 100644
--- a/apps/wallet-mobile/src/legacy/Staking/PoolTransition/usePoolTransition.tsx
+++ b/apps/wallet-mobile/src/legacy/Staking/PoolTransition/usePoolTransition.tsx
@@ -7,9 +7,12 @@ import * as React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {useQuery} from 'react-query'
+import {DelegateStakeOperation} from '../../../features/ReviewTx/common/operations'
+import {useReviewTx} from '../../../features/ReviewTx/common/ReviewTxProvider'
import {useSelectedNetwork} from '../../../features/WalletManager/common/hooks/useSelectedNetwork'
import {useSelectedWallet} from '../../../features/WalletManager/common/hooks/useSelectedWallet'
import {features} from '../../../kernel/features'
+import {AppRouteNavigation, StakingCenterRouteNavigation, useWalletNavigation} from '../../../kernel/navigation'
import {YoroiWallet} from '../../../yoroi-wallets/cardano/types'
import {asQuantity, Quantities} from '../../../yoroi-wallets/utils/utils'
import {useStakingInfo} from '../../Dashboard/StakePoolInfos'
@@ -33,9 +36,12 @@ const createDelegationTx = async (wallet: YoroiWallet, poolId: string, meta: Wal
}
export const usePoolTransition = () => {
- const navigation = useNavigation()
+ const navigation = useNavigation()
+
const {wallet, meta} = useSelectedWallet()
const {networkManager} = useSelectedNetwork()
+ const {navigateToTxReview, resetToTxHistory} = useWalletNavigation()
+ const {unsignedTxChanged, onSuccessChanged, onErrorChanged, operationsChanged} = useReviewTx()
const {stakingInfo, isLoading} = useStakingInfo(wallet)
const poolInfoApi = React.useMemo(
() => new PoolInfoApi(networkManager.legacyApiBaseUrl),
@@ -59,17 +65,13 @@ export const usePoolTransition = () => {
const navigateToUpdate = React.useCallback(async () => {
try {
const yoroiUnsignedTx = await createDelegationTx(wallet, poolId, meta)
- navigation.navigate('manage-wallets', {
- screen: 'staking-dashboard',
- params: {
- screen: 'delegation-confirmation',
- initial: false,
- params: {
- poolId,
- yoroiUnsignedTx,
- },
- },
+ operationsChanged([])
+ unsignedTxChanged(yoroiUnsignedTx)
+ onSuccessChanged(() => {
+ resetToTxHistory()
})
+ onErrorChanged(() => navigation.navigate('delegation-failed-tx'))
+ navigateToTxReview()
} catch (err) {
navigation.navigate('manage-wallets', {
screen: 'staking-dashboard',
@@ -79,7 +81,18 @@ export const usePoolTransition = () => {
},
})
}
- }, [meta, navigation, poolId, wallet])
+ }, [
+ wallet,
+ poolId,
+ meta,
+ operationsChanged,
+ unsignedTxChanged,
+ onSuccessChanged,
+ onErrorChanged,
+ navigateToTxReview,
+ resetToTxHistory,
+ navigation,
+ ])
return {
...poolTransitionQuery,
diff --git a/apps/wallet-mobile/src/legacy/Staking/StakingCenter/StakingCenter.tsx b/apps/wallet-mobile/src/legacy/Staking/StakingCenter/StakingCenter.tsx
index 344d817bfa..425290317f 100644
--- a/apps/wallet-mobile/src/legacy/Staking/StakingCenter/StakingCenter.tsx
+++ b/apps/wallet-mobile/src/legacy/Staking/StakingCenter/StakingCenter.tsx
@@ -5,9 +5,12 @@ import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, View} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'
import {WebView, WebViewMessageEvent} from 'react-native-webview'
+import {useQueryClient} from 'react-query'
import {PleaseWaitModal} from '../../../components/PleaseWaitModal'
import {Spacer} from '../../../components/Spacer/Spacer'
+import {DelegateStakeOperation, RegisterStakingKeyOperation} from '../../../features/ReviewTx/common/operations'
+import {useReviewTx} from '../../../features/ReviewTx/common/ReviewTxProvider'
import {useSelectedWallet} from '../../../features/WalletManager/common/hooks/useSelectedWallet'
import {useWalletManager} from '../../../features/WalletManager/context/WalletManagerProvider'
import {showErrorDialog} from '../../../kernel/dialogs'
@@ -15,9 +18,9 @@ import {useLanguage} from '../../../kernel/i18n'
import globalMessages from '../../../kernel/i18n/global-messages'
import {logger} from '../../../kernel/logger/logger'
import {useMetrics} from '../../../kernel/metrics/metricsManager'
-import {StakingCenterRouteNavigation} from '../../../kernel/navigation'
+import {StakingCenterRouteNavigation, useWalletNavigation} from '../../../kernel/navigation'
import {NotEnoughMoneyToSendError} from '../../../yoroi-wallets/cardano/types'
-import {useStakingTx} from '../../Dashboard/StakePoolInfos'
+import {useStakingInfo, useStakingTx} from '../../Dashboard/StakePoolInfos'
import {PoolDetailScreen} from '../PoolDetails'
export const StakingCenter = () => {
@@ -25,12 +28,17 @@ export const StakingCenter = () => {
const navigation = useNavigation()
const {isDark} = useTheme()
const {styles} = useStyles()
+ const queryClient = useQueryClient()
const {languageCode} = useLanguage()
const {wallet, meta} = useSelectedWallet()
const {walletManager} = useWalletManager()
const {track} = useMetrics()
const {plate} = walletManager.checksum(wallet.publicKeyHex)
+ const {navigateToTxReview, resetToTxHistory} = useWalletNavigation()
+ const {unsignedTxChanged, onSuccessChanged, onErrorChanged, operationsChanged} = useReviewTx()
+ const stakingInfo = useStakingInfo(wallet, {suspense: true})
+ const hasStakingKeyRegistered = stakingInfo?.data?.status !== 'not-registered'
useFocusEffect(
React.useCallback(() => {
@@ -49,10 +57,17 @@ export const StakingCenter = () => {
onSuccess: (yoroiUnsignedTx) => {
if (selectedPoolId == null) return
- navigation.navigate('delegation-confirmation', {
- poolId: selectedPoolId,
- yoroiUnsignedTx,
+ let operations = []
+ if (!hasStakingKeyRegistered) operations = [, ...operations]
+
+ operationsChanged(operations)
+ unsignedTxChanged(yoroiUnsignedTx)
+ onSuccessChanged(() => {
+ queryClient.resetQueries([wallet.id, 'stakingInfo'])
+ resetToTxHistory()
})
+ onErrorChanged(() => navigation.navigate('delegation-failed-tx'))
+ navigateToTxReview()
},
onError: (error) => {
if (error instanceof NotEnoughMoneyToSendError) {
diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/delegationUtils.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/delegationUtils.ts
index c524c6d73e..cadc956a99 100644
--- a/apps/wallet-mobile/src/yoroi-wallets/cardano/delegationUtils.ts
+++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/delegationUtils.ts
@@ -112,6 +112,16 @@ const isValidPoolId = async (poolId: string): Promise => {
}
}
+export const getPoolBech32Id = async (poolId: string) => {
+ const {csl, release} = wrappedCsl()
+ try {
+ const keyHash = await csl.Ed25519KeyHash.fromHex(poolId)
+ return keyHash.toBech32('pool')
+ } finally {
+ release()
+ }
+}
+
const isValidPoolHash = async (poolHash: string): Promise => {
if (poolHash.length === 0) return false
diff --git a/apps/wallet-mobile/translations/messages/src/features/ReviewTx/common/hooks/useStrings.json b/apps/wallet-mobile/translations/messages/src/features/ReviewTx/common/hooks/useStrings.json
index fdeb1cc006..9e1a48b052 100644
--- a/apps/wallet-mobile/translations/messages/src/features/ReviewTx/common/hooks/useStrings.json
+++ b/apps/wallet-mobile/translations/messages/src/features/ReviewTx/common/hooks/useStrings.json
@@ -4,14 +4,14 @@
"defaultMessage": "!!!Confirm",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 42,
+ "line": 47,
"column": 11,
- "index": 1976
+ "index": 2325
},
"end": {
- "line": 45,
+ "line": 50,
"column": 3,
- "index": 2043
+ "index": 2392
}
},
{
@@ -19,14 +19,14 @@
"defaultMessage": "!!!UTxOs",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 46,
+ "line": 51,
"column": 9,
- "index": 2054
+ "index": 2403
},
"end": {
- "line": 49,
+ "line": 54,
"column": 3,
- "index": 2117
+ "index": 2466
}
},
{
@@ -34,14 +34,14 @@
"defaultMessage": "!!!UTxOs",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 50,
+ "line": 55,
"column": 12,
- "index": 2131
+ "index": 2480
},
"end": {
- "line": 53,
+ "line": 58,
"column": 3,
- "index": 2203
+ "index": 2552
}
},
{
@@ -49,14 +49,14 @@
"defaultMessage": "!!!Overview",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 54,
+ "line": 59,
"column": 15,
- "index": 2220
+ "index": 2569
},
"end": {
- "line": 57,
+ "line": 62,
"column": 3,
- "index": 2298
+ "index": 2647
}
},
{
@@ -64,14 +64,14 @@
"defaultMessage": "!!!Metadata",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 58,
+ "line": 63,
"column": 15,
- "index": 2315
+ "index": 2664
},
"end": {
- "line": 61,
+ "line": 66,
"column": 3,
- "index": 2396
+ "index": 2745
}
},
{
@@ -79,14 +79,14 @@
"defaultMessage": "!!!Metadata hash",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 62,
+ "line": 67,
"column": 16,
- "index": 2414
+ "index": 2763
},
"end": {
- "line": 65,
+ "line": 70,
"column": 3,
- "index": 2501
+ "index": 2850
}
},
{
@@ -94,14 +94,14 @@
"defaultMessage": "!!!Metadata",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 66,
+ "line": 71,
"column": 21,
- "index": 2524
+ "index": 2873
},
"end": {
- "line": 69,
+ "line": 74,
"column": 3,
- "index": 2611
+ "index": 2960
}
},
{
@@ -109,14 +109,14 @@
"defaultMessage": "!!!Wallet",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 70,
+ "line": 75,
"column": 15,
- "index": 2628
+ "index": 2977
},
"end": {
- "line": 73,
+ "line": 78,
"column": 3,
- "index": 2702
+ "index": 3051
}
},
{
@@ -124,14 +124,14 @@
"defaultMessage": "!!!Fee",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 74,
+ "line": 79,
"column": 12,
- "index": 2716
+ "index": 3065
},
"end": {
- "line": 77,
+ "line": 82,
"column": 3,
- "index": 2775
+ "index": 3124
}
},
{
@@ -139,14 +139,14 @@
"defaultMessage": "!!!Your Wallet",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 78,
+ "line": 83,
"column": 17,
- "index": 2794
+ "index": 3143
},
"end": {
- "line": 81,
+ "line": 86,
"column": 3,
- "index": 2880
+ "index": 3229
}
},
{
@@ -154,14 +154,14 @@
"defaultMessage": "!!!Send",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 82,
+ "line": 87,
"column": 13,
- "index": 2895
+ "index": 3244
},
"end": {
- "line": 85,
+ "line": 90,
"column": 3,
- "index": 2970
+ "index": 3319
}
},
{
@@ -169,14 +169,14 @@
"defaultMessage": "!!!To",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 86,
+ "line": 91,
"column": 18,
- "index": 2990
+ "index": 3339
},
"end": {
- "line": 89,
+ "line": 94,
"column": 3,
- "index": 3068
+ "index": 3417
}
},
{
@@ -184,14 +184,14 @@
"defaultMessage": "!!!To script",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 90,
+ "line": 95,
"column": 24,
- "index": 3094
+ "index": 3443
},
"end": {
- "line": 93,
+ "line": 98,
"column": 3,
- "index": 3185
+ "index": 3534
}
},
{
@@ -199,14 +199,14 @@
"defaultMessage": "!!!Inputs",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 94,
+ "line": 99,
"column": 20,
- "index": 3207
+ "index": 3556
},
"end": {
- "line": 97,
+ "line": 102,
"column": 3,
- "index": 3288
+ "index": 3637
}
},
{
@@ -214,14 +214,14 @@
"defaultMessage": "!!!Outputs",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 98,
+ "line": 103,
"column": 21,
- "index": 3311
+ "index": 3660
},
"end": {
- "line": 101,
+ "line": 106,
"column": 3,
- "index": 3394
+ "index": 3743
}
},
{
@@ -229,14 +229,14 @@
"defaultMessage": "!!!Your address",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 102,
+ "line": 107,
"column": 25,
- "index": 3421
+ "index": 3770
},
"end": {
- "line": 105,
+ "line": 110,
"column": 3,
- "index": 3513
+ "index": 3862
}
},
{
@@ -244,14 +244,14 @@
"defaultMessage": "!!!Foreign address",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 106,
+ "line": 111,
"column": 28,
- "index": 3543
+ "index": 3892
},
"end": {
- "line": 109,
+ "line": 114,
"column": 3,
- "index": 3641
+ "index": 3990
}
},
{
@@ -259,14 +259,14 @@
"defaultMessage": "!!!Overview",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 110,
+ "line": 115,
"column": 12,
- "index": 3655
+ "index": 4004
},
"end": {
- "line": 113,
+ "line": 118,
"column": 3,
- "index": 3746
+ "index": 4095
}
},
{
@@ -274,14 +274,14 @@
"defaultMessage": "!!!JSON",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 114,
+ "line": 119,
"column": 8,
- "index": 3756
+ "index": 4105
},
"end": {
- "line": 117,
+ "line": 122,
"column": 3,
- "index": 3839
+ "index": 4188
}
},
{
@@ -289,14 +289,14 @@
"defaultMessage": "!!!Metadata",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 118,
+ "line": 123,
"column": 12,
- "index": 3853
+ "index": 4202
},
"end": {
- "line": 121,
+ "line": 126,
"column": 3,
- "index": 3943
+ "index": 4292
}
},
{
@@ -304,14 +304,14 @@
"defaultMessage": "!!!Policy ID",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 122,
+ "line": 127,
"column": 12,
- "index": 3957
+ "index": 4306
},
"end": {
- "line": 125,
+ "line": 130,
"column": 3,
- "index": 4046
+ "index": 4395
}
},
{
@@ -319,14 +319,14 @@
"defaultMessage": "!!!Fingerprint",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 126,
+ "line": 131,
"column": 15,
- "index": 4063
+ "index": 4412
},
"end": {
- "line": 129,
+ "line": 134,
"column": 3,
- "index": 4157
+ "index": 4506
}
},
{
@@ -334,14 +334,14 @@
"defaultMessage": "!!!Name",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 130,
+ "line": 135,
"column": 8,
- "index": 4167
+ "index": 4516
},
"end": {
- "line": 133,
+ "line": 138,
"column": 3,
- "index": 4259
+ "index": 4608
}
},
{
@@ -349,14 +349,14 @@
"defaultMessage": "!!!Token Supply",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 134,
+ "line": 139,
"column": 15,
- "index": 4276
+ "index": 4625
},
"end": {
- "line": 137,
+ "line": 142,
"column": 3,
- "index": 4383
+ "index": 4732
}
},
{
@@ -364,14 +364,14 @@
"defaultMessage": "!!!Symbol",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 138,
+ "line": 143,
"column": 10,
- "index": 4395
+ "index": 4744
},
"end": {
- "line": 141,
+ "line": 146,
"column": 3,
- "index": 4491
+ "index": 4840
}
},
{
@@ -379,14 +379,14 @@
"defaultMessage": "!!!Description",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 142,
+ "line": 147,
"column": 15,
- "index": 4508
+ "index": 4857
},
"end": {
- "line": 145,
+ "line": 150,
"column": 3,
- "index": 4614
+ "index": 4963
}
},
{
@@ -394,14 +394,14 @@
"defaultMessage": "!!!Details on",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 146,
+ "line": 151,
"column": 11,
- "index": 4627
+ "index": 4976
},
"end": {
- "line": 149,
+ "line": 154,
"column": 3,
- "index": 4728
+ "index": 5077
}
},
{
@@ -409,14 +409,89 @@
"defaultMessage": "!!!Asset Details",
"file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
"start": {
- "line": 150,
+ "line": 155,
"column": 21,
- "index": 4751
+ "index": 5100
+ },
+ "end": {
+ "line": 158,
+ "column": 3,
+ "index": 5184
+ }
+ },
+ {
+ "id": "txReview.operations.registerStakingKey",
+ "defaultMessage": "!!!Register staking key deposit",
+ "file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
+ "start": {
+ "line": 159,
+ "column": 22,
+ "index": 5208
+ },
+ "end": {
+ "line": 162,
+ "column": 3,
+ "index": 5318
+ }
+ },
+ {
+ "id": "txReview.operations.selectAbstain",
+ "defaultMessage": "!!!Select abstain",
+ "file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
+ "start": {
+ "line": 163,
+ "column": 17,
+ "index": 5337
+ },
+ "end": {
+ "line": 166,
+ "column": 3,
+ "index": 5428
+ }
+ },
+ {
+ "id": "txReview.operations.selectNoConfidence",
+ "defaultMessage": "!!!Select no confidence",
+ "file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
+ "start": {
+ "line": 167,
+ "column": 22,
+ "index": 5452
+ },
+ "end": {
+ "line": 170,
+ "column": 3,
+ "index": 5554
+ }
+ },
+ {
+ "id": "txReview.operations.delegateVotingToDRep",
+ "defaultMessage": "!!!Delegate voting to",
+ "file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
+ "start": {
+ "line": 171,
+ "column": 24,
+ "index": 5580
+ },
+ "end": {
+ "line": 174,
+ "column": 3,
+ "index": 5682
+ }
+ },
+ {
+ "id": "txReview.operations.delegateStake",
+ "defaultMessage": "!!!Stake entire wallet balance to",
+ "file": "src/features/ReviewTx/common/hooks/useStrings.tsx",
+ "start": {
+ "line": 175,
+ "column": 17,
+ "index": 5701
},
"end": {
- "line": 153,
+ "line": 178,
"column": 3,
- "index": 4835
+ "index": 5808
}
}
]
\ No newline at end of file
diff --git a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json
index 7f80182884..27dd43c7e4 100644
--- a/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json
+++ b/apps/wallet-mobile/translations/messages/src/legacy/Dashboard/DashboardNavigator.json
@@ -4,14 +4,14 @@
"defaultMessage": "!!!Staking Center",
"file": "src/legacy/Dashboard/DashboardNavigator.tsx",
"start": {
- "line": 64,
+ "line": 61,
"column": 9,
- "index": 2092
+ "index": 1927
},
"end": {
- "line": 67,
+ "line": 64,
"column": 3,
- "index": 2180
+ "index": 2015
}
}
]
\ No newline at end of file
diff --git a/apps/wallet-mobile/translations/messages/src/legacy/Staking/PoolTransition/usePoolTransition.json b/apps/wallet-mobile/translations/messages/src/legacy/Staking/PoolTransition/usePoolTransition.json
index 14002a4758..1ec5530969 100644
--- a/apps/wallet-mobile/translations/messages/src/legacy/Staking/PoolTransition/usePoolTransition.json
+++ b/apps/wallet-mobile/translations/messages/src/legacy/Staking/PoolTransition/usePoolTransition.json
@@ -4,14 +4,14 @@
"defaultMessage": "!!!Upgrade your stake pool",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 114,
+ "line": 127,
"column": 9,
- "index": 4057
+ "index": 4719
},
"end": {
- "line": 117,
+ "line": 130,
"column": 3,
- "index": 4155
+ "index": 4817
}
},
{
@@ -19,14 +19,14 @@
"defaultMessage": "!!!The current stake pool you're using will soon close. Migrate to the new EMURGO pool to sustain reward generation.",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 118,
+ "line": 131,
"column": 11,
- "index": 4168
+ "index": 4830
},
"end": {
- "line": 122,
+ "line": 135,
"column": 3,
- "index": 4364
+ "index": 5026
}
},
{
@@ -34,14 +34,14 @@
"defaultMessage": "!!!The current stake pool you're using is decommissioned and NOT generating reward anymore. Update it to continue earning",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 123,
+ "line": 136,
"column": 16,
- "index": 4382
+ "index": 5044
},
"end": {
- "line": 127,
+ "line": 140,
"column": 3,
- "index": 4588
+ "index": 5250
}
},
{
@@ -49,14 +49,14 @@
"defaultMessage": "!!!Current pool",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 128,
+ "line": 141,
"column": 15,
- "index": 4605
+ "index": 5267
},
"end": {
- "line": 131,
+ "line": 144,
"column": 3,
- "index": 4698
+ "index": 5360
}
},
{
@@ -64,14 +64,14 @@
"defaultMessage": "!!!New pool",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 132,
+ "line": 145,
"column": 11,
- "index": 4711
+ "index": 5373
},
"end": {
- "line": 135,
+ "line": 148,
"column": 3,
- "index": 4796
+ "index": 5458
}
},
{
@@ -79,14 +79,14 @@
"defaultMessage": "!!!Estimated ROA",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 136,
+ "line": 149,
"column": 16,
- "index": 4814
+ "index": 5476
},
"end": {
- "line": 139,
+ "line": 152,
"column": 3,
- "index": 4909
+ "index": 5571
}
},
{
@@ -94,14 +94,14 @@
"defaultMessage": "!!!Fee",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 140,
+ "line": 153,
"column": 7,
- "index": 4918
+ "index": 5580
},
"end": {
- "line": 143,
+ "line": 156,
"column": 3,
- "index": 4994
+ "index": 5656
}
},
{
@@ -109,14 +109,14 @@
"defaultMessage": "!!!This pool continues to generate staking rewards",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 144,
+ "line": 157,
"column": 24,
- "index": 5020
+ "index": 5682
},
"end": {
- "line": 147,
+ "line": 160,
"column": 3,
- "index": 5157
+ "index": 5819
}
},
{
@@ -124,14 +124,14 @@
"defaultMessage": "!!!This pool is NOT generating staking rewards anymore",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 148,
+ "line": 161,
"column": 17,
- "index": 5176
+ "index": 5838
},
"end": {
- "line": 151,
+ "line": 164,
"column": 3,
- "index": 5310
+ "index": 5972
}
},
{
@@ -139,14 +139,14 @@
"defaultMessage": "!!!This pool will stop generating rewards in",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 152,
+ "line": 165,
"column": 23,
- "index": 5335
+ "index": 5997
},
"end": {
- "line": 155,
+ "line": 168,
"column": 3,
- "index": 5465
+ "index": 6127
}
},
{
@@ -154,14 +154,14 @@
"defaultMessage": "!!!Skip and stop receiving rewards",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 156,
+ "line": 169,
"column": 17,
- "index": 5484
+ "index": 6146
},
"end": {
- "line": 159,
+ "line": 172,
"column": 3,
- "index": 5598
+ "index": 6260
}
},
{
@@ -169,14 +169,14 @@
"defaultMessage": "!!!Update now and keep earning",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 160,
+ "line": 173,
"column": 21,
- "index": 5621
+ "index": 6283
},
"end": {
- "line": 163,
+ "line": 176,
"column": 3,
- "index": 5735
+ "index": 6397
}
},
{
@@ -184,14 +184,14 @@
"defaultMessage": "!!!Update pool",
"file": "src/legacy/Staking/PoolTransition/usePoolTransition.tsx",
"start": {
- "line": 164,
+ "line": 177,
"column": 10,
- "index": 5747
+ "index": 6409
},
"end": {
- "line": 167,
+ "line": 180,
"column": 3,
- "index": 5834
+ "index": 6496
}
}
]
\ No newline at end of file
diff --git a/apps/wallet-mobile/translations/messages/src/legacy/Staking/StakingCenter/StakingCenter.json b/apps/wallet-mobile/translations/messages/src/legacy/Staking/StakingCenter/StakingCenter.json
index 30704959bc..4f55b6775b 100644
--- a/apps/wallet-mobile/translations/messages/src/legacy/Staking/StakingCenter/StakingCenter.json
+++ b/apps/wallet-mobile/translations/messages/src/legacy/Staking/StakingCenter/StakingCenter.json
@@ -4,14 +4,14 @@
"defaultMessage": "!!!Invalid Pool Data",
"file": "src/legacy/Staking/StakingCenter/StakingCenter.tsx",
"start": {
- "line": 131,
+ "line": 146,
"column": 9,
- "index": 4730
+ "index": 5740
},
"end": {
- "line": 134,
+ "line": 149,
"column": 3,
- "index": 4838
+ "index": 5848
}
},
{
@@ -19,14 +19,14 @@
"defaultMessage": "!!!The data from the stake pool(s) you selected is invalid. Please try again",
"file": "src/legacy/Staking/StakingCenter/StakingCenter.tsx",
"start": {
- "line": 135,
+ "line": 150,
"column": 11,
- "index": 4851
+ "index": 5861
},
"end": {
- "line": 138,
+ "line": 153,
"column": 3,
- "index": 5017
+ "index": 6027
}
}
]
\ No newline at end of file