diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js
index 41fde2e017..ce14bcbce3 100644
--- a/apps/wallet-mobile/.storybook/storybook.requires.js
+++ b/apps/wallet-mobile/.storybook/storybook.requires.js
@@ -227,7 +227,6 @@ const getStories = () => {
"./src/features/Staking/Governance/common/Action/Action.stories.tsx": require("../src/features/Staking/Governance/common/Action/Action.stories.tsx"),
"./src/features/Staking/Governance/common/LearnMoreLink/LearnMoreLink.stories.tsx": require("../src/features/Staking/Governance/common/LearnMoreLink/LearnMoreLink.stories.tsx"),
"./src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.stories.tsx"),
- "./src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx"),
"./src/features/Staking/Governance/useCases/EnterDrepIdModal/EnterDrepIdModal.stories.tsx": require("../src/features/Staking/Governance/useCases/EnterDrepIdModal/EnterDrepIdModal.stories.tsx"),
"./src/features/Staking/Governance/useCases/FailedTx/FailedTxScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/FailedTx/FailedTxScreen.stories.tsx"),
"./src/features/Staking/Governance/useCases/Home/HomeScreen.stories.tsx": require("../src/features/Staking/Governance/useCases/Home/HomeScreen.stories.tsx"),
diff --git a/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/TokenItem.tsx
index fabea93b81..51ec99bbaa 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/useOnConfirm.tsx b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useOnConfirm.tsx
index 38188b6e93..871badd91b 100644
--- a/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useOnConfirm.tsx
+++ b/apps/wallet-mobile/src/features/ReviewTx/common/hooks/useOnConfirm.tsx
@@ -5,6 +5,7 @@ import {ConfirmTxWithOsModal} from '../../../../components/ConfirmTxWithOsModal/
import {ConfirmTxWithSpendingPasswordModal} from '../../../../components/ConfirmTxWithSpendingPasswordModal/ConfirmTxWithSpendingPasswordModal'
import {useModal} from '../../../../components/Modal/ModalContext'
import {YoroiSignedTx, YoroiUnsignedTx} from '../../../../yoroi-wallets/types/yoroi'
+import {useNavigateTo} from '../../../Staking/Governance/common/navigation'
import {useSelectedWallet} from '../../../WalletManager/common/hooks/useSelectedWallet'
import {useStrings} from './useStrings'
@@ -13,19 +14,18 @@ export const useOnConfirm = ({
unsignedTx,
onSuccess,
onError,
- onNotSupportedCIP1694,
}: {
onSuccess?: ((txId: YoroiSignedTx) => void) | null
onError?: (() => void) | null
cbor?: string
unsignedTx?: YoroiUnsignedTx
- onNotSupportedCIP1694?: () => void
}) => {
if (unsignedTx === undefined) throw new Error('useOnConfirm: unsignedTx missing')
const {meta} = useSelectedWallet()
const {openModal, closeModal} = useModal()
const strings = useStrings()
+ const navigateTo = useNavigateTo()
const onConfirm = () => {
if (meta.isHW) {
@@ -35,7 +35,10 @@ export const useOnConfirm = ({
onCancel={closeModal}
unsignedTx={unsignedTx}
onSuccess={(signedTx) => onSuccess?.(signedTx)}
- onNotSupportedCIP1694={onNotSupportedCIP1694}
+ onNotSupportedCIP1694={() => {
+ closeModal()
+ navigateTo.notSupportedVersion()
+ }}
/>,
400,
)
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/GovernanceNavigator.tsx b/apps/wallet-mobile/src/features/Staking/Governance/GovernanceNavigator.tsx
index 5df15e523e..865e67fbf0 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/GovernanceNavigator.tsx
+++ b/apps/wallet-mobile/src/features/Staking/Governance/GovernanceNavigator.tsx
@@ -9,7 +9,6 @@ import {useGovernanceManagerMaker} from './common/helpers'
import {NavigationStack} from './common/navigation'
import {useStrings} from './common/strings'
import {ChangeVoteScreen} from './useCases/ChangeVote/ChangeVoteScreen'
-import {ConfirmTxScreen} from './useCases/ConfirmTx/ConfirmTxScreen'
import {FailedTxScreen} from './useCases/FailedTx/FailedTxScreen'
import {HomeScreen} from './useCases/Home/HomeScreen'
import {NoFundsScreen} from './useCases/NoFunds/NoFundsScreen'
@@ -44,12 +43,6 @@ export const GovernanceNavigator = () => {
options={{title: strings.governanceCentreTitle}}
/>
-
-
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.ts b/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.ts
deleted file mode 100644
index 304f619fbb..0000000000
--- a/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import {useAsyncStorage} from '@yoroi/common'
-import {type StakingKeyState, governanceApiMaker, governanceManagerMaker, useStakingKeyState} from '@yoroi/staking'
-import * as React from 'react'
-
-import {governaceAfterBlock} from '../../../../kernel/config'
-import {YoroiWallet} from '../../../../yoroi-wallets/cardano/types'
-import {useStakingKey} from '../../../../yoroi-wallets/hooks'
-import {CardanoMobile} from '../../../../yoroi-wallets/wallets'
-import {useBestBlock} from '../../../WalletManager/common/hooks/useBestBlock'
-import {useSelectedWallet} from '../../../WalletManager/common/hooks/useSelectedWallet'
-import {GovernanceVote} from '../types'
-
-export const useIsParticipatingInGovernance = (wallet: YoroiWallet) => {
- const stakingKeyHash = useStakingKey(wallet)
- const {data: stakingStatus} = useStakingKeyState(stakingKeyHash, {
- suspense: true,
- useErrorBoundary: false,
- retry: false,
- })
- return stakingStatus ? mapStakingKeyStateToGovernanceAction(stakingStatus) !== null : false
-}
-
-export const mapStakingKeyStateToGovernanceAction = (state: StakingKeyState): GovernanceVote | null => {
- if (!state.drepDelegation) return null
- const vote = state.drepDelegation
- return vote.action === 'abstain'
- ? {kind: 'abstain'}
- : vote.action === 'no-confidence'
- ? {kind: 'no-confidence'}
- : {kind: 'delegate', drepID: vote.drepID}
-}
-
-export const useIsGovernanceFeatureEnabled = (wallet: YoroiWallet) => {
- const bestBlock = useBestBlock({options: {suspense: true}})
- return bestBlock.height >= governaceAfterBlock[wallet.networkManager.network]
-}
-
-export const useGovernanceManagerMaker = () => {
- const {
- wallet: {
- networkManager: {network},
- id: walletId,
- },
- } = useSelectedWallet()
-
- const storage = useAsyncStorage()
- const governanceStorage = storage.join(`wallet/${walletId}/staking-governance/`)
-
- return React.useMemo(
- () =>
- governanceManagerMaker({
- walletId,
- network,
- api: governanceApiMaker({network}),
- cardano: CardanoMobile,
- storage: governanceStorage,
- }),
- [governanceStorage, network, walletId],
- )
-}
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx b/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx
new file mode 100644
index 0000000000..8e02078802
--- /dev/null
+++ b/apps/wallet-mobile/src/features/Staking/Governance/common/helpers.tsx
@@ -0,0 +1,250 @@
+import {useAsyncStorage} from '@yoroi/common'
+import {
+ type StakingKeyState,
+ 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 {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)
+ const {data: stakingStatus} = useStakingKeyState(stakingKeyHash, {
+ suspense: true,
+ useErrorBoundary: false,
+ retry: false,
+ })
+ return stakingStatus ? mapStakingKeyStateToGovernanceAction(stakingStatus) !== null : false
+}
+
+export const mapStakingKeyStateToGovernanceAction = (state: StakingKeyState): GovernanceVote | null => {
+ if (!state.drepDelegation) return null
+ const vote = state.drepDelegation
+ return vote.action === 'abstain'
+ ? {kind: 'abstain'}
+ : vote.action === 'no-confidence'
+ ? {kind: 'no-confidence'}
+ : {kind: 'delegate', drepID: vote.drepID}
+}
+
+export const useIsGovernanceFeatureEnabled = (wallet: YoroiWallet) => {
+ const bestBlock = useBestBlock({options: {suspense: true}})
+ return bestBlock.height >= governaceAfterBlock[wallet.networkManager.network]
+}
+
+export const useGovernanceManagerMaker = () => {
+ const {
+ wallet: {
+ networkManager: {network},
+ id: walletId,
+ },
+ } = useSelectedWallet()
+
+ const storage = useAsyncStorage()
+ const governanceStorage = storage.join(`wallet/${walletId}/staking-governance/`)
+
+ return React.useMemo(
+ () =>
+ governanceManagerMaker({
+ walletId,
+ network,
+ api: governanceApiMaker({network}),
+ cardano: CardanoMobile,
+ storage: governanceStorage,
+ }),
+ [governanceStorage, network, walletId],
+ )
+}
+
+export const useGovernanceActions = () => {
+ const {manager} = useGovernance()
+ const {wallet} = useSelectedWallet()
+ const navigateTo = useNavigateTo()
+ const {unsignedTxChanged, onSuccessChanged, onErrorChanged, operationsChanged} = useReviewTx()
+ const {updateLatestGovernanceAction} = useUpdateLatestGovernanceAction(wallet.id)
+ const {navigateToTxReview} = useWalletNavigation()
+
+ const handleDelegateAction = ({
+ drepID,
+ unsignedTx,
+ hasStakeCert = false,
+ navigateToStakingOnSuccess = false,
+ }: {
+ drepID: string
+ unsignedTx: YoroiUnsignedTx
+ hasStakeCert?: boolean
+ navigateToStakingOnSuccess?: boolean
+ }) => {
+ let operations = [
+
+
+ ,
+ ]
+
+ if (hasStakeCert) operations = [, ...operations]
+
+ operationsChanged(operations)
+ onSuccessChanged((signedTx) => {
+ updateLatestGovernanceAction({kind: 'delegate-to-drep', drepID, txID: signedTx.signedTx.id})
+ navigateTo.txSuccess({navigateToStaking: navigateToStakingOnSuccess ?? false, kind: 'delegate'})
+ })
+ onErrorChanged(() => navigateTo.txFailed())
+ unsignedTxChanged(unsignedTx)
+
+ navigateToTxReview()
+ }
+
+ const handleAbstainAction = ({
+ unsignedTx,
+ hasStakeCert = false,
+ navigateToStakingOnSuccess = false,
+ }: {
+ unsignedTx: YoroiUnsignedTx
+ hasStakeCert?: boolean
+ navigateToStakingOnSuccess?: boolean
+ }) => {
+ let operations = []
+ if (hasStakeCert) operations = [, ...operations]
+
+ operationsChanged(operations)
+ onSuccessChanged((signedTx) => {
+ updateLatestGovernanceAction({kind: 'vote', vote: 'abstain', txID: signedTx.signedTx.id})
+ navigateTo.txSuccess({navigateToStaking: navigateToStakingOnSuccess ?? false, kind: 'abstain'})
+ })
+ onErrorChanged(() => navigateTo.txFailed())
+ unsignedTxChanged(unsignedTx)
+
+ navigateToTxReview()
+ }
+
+ const handleNoConfidenceAction = ({
+ unsignedTx,
+ hasStakeCert = false,
+ navigateToStakingOnSuccess = false,
+ }: {
+ unsignedTx: YoroiUnsignedTx
+ hasStakeCert?: boolean
+ navigateToStakingOnSuccess?: boolean
+ }) => {
+ let operations = []
+ if (hasStakeCert) operations = [, ...operations]
+
+ operationsChanged(operations)
+ onSuccessChanged((signedTx) => {
+ updateLatestGovernanceAction({kind: 'vote', vote: 'no-confidence', txID: signedTx.signedTx.id})
+ navigateTo.txSuccess({
+ navigateToStaking: navigateToStakingOnSuccess ?? false,
+ kind: 'no-confidence',
+ })
+ })
+ onErrorChanged(() => navigateTo.txFailed())
+ unsignedTxChanged(unsignedTx)
+
+ navigateToTxReview()
+ }
+
+ 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/features/Staking/Governance/common/navigation.ts b/apps/wallet-mobile/src/features/Staking/Governance/common/navigation.ts
index 62b7b4e91c..fc20cd6c4a 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/common/navigation.ts
+++ b/apps/wallet-mobile/src/features/Staking/Governance/common/navigation.ts
@@ -2,7 +2,6 @@ import {useNavigation} from '@react-navigation/native'
import {createStackNavigator, StackNavigationProp} from '@react-navigation/stack'
import {useRef} from 'react'
-import {YoroiUnsignedTx} from '../../../../yoroi-wallets/types/yoroi'
import {GovernanceVote} from '../types'
export type Routes = {
@@ -10,12 +9,6 @@ export type Routes = {
navigateToStakingOnSuccess?: boolean
}
'staking-gov-change-vote': undefined
- 'staking-gov-confirm-tx': {
- vote: GovernanceVote
- unsignedTx: YoroiUnsignedTx
- registerStakingKey?: boolean
- navigateToStakingOnSuccess?: boolean
- }
'staking-gov-tx-success'?: {navigateToStaking?: boolean; kind: GovernanceVote['kind']}
'staking-gov-tx-failed': undefined
'staking-gov-not-supported-version': undefined
@@ -29,7 +22,6 @@ export const useNavigateTo = () => {
return useRef({
home: () => navigation.navigate('staking-gov-home'),
changeVote: () => navigation.navigate('staking-gov-change-vote'),
- confirmTx: (params: Routes['staking-gov-confirm-tx']) => navigation.navigate('staking-gov-confirm-tx', params),
txSuccess: (params?: Routes['staking-gov-tx-success']) => navigation.navigate('staking-gov-tx-success', params),
txFailed: () => navigation.navigate('staking-gov-tx-failed'),
notSupportedVersion: () => navigation.navigate('staking-gov-not-supported-version'),
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/common/strings.ts b/apps/wallet-mobile/src/features/Staking/Governance/common/strings.ts
index 2280cb83df..b53ad73cd3 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/common/strings.ts
+++ b/apps/wallet-mobile/src/features/Staking/Governance/common/strings.ts
@@ -18,7 +18,7 @@ export const useStrings = () => {
drepKey: intl.formatMessage(messages.drepKey),
delegatingToADRep: intl.formatMessage(messages.delegatingToADRep),
abstaining: intl.formatMessage(messages.abstaining),
- delegateVotingToDRep: (drepID: string) => intl.formatMessage(messages.delegateVotingToDRep, {drepID}),
+ delegateVotingToDRep: intl.formatMessage(messages.delegateVotingToDRep),
selectAbstain: intl.formatMessage(messages.selectAbstain),
selectNoConfidence: intl.formatMessage(messages.selectNoConfidence),
operations: intl.formatMessage(messages.operations),
@@ -124,7 +124,7 @@ const messages = defineMessages({
},
delegateVotingToDRep: {
id: 'components.governance.delegateVotingToDRep',
- defaultMessage: '!!!Delegate voting to \n{drepID}',
+ defaultMessage: '!!!Delegate voting to',
},
selectAbstain: {
id: 'components.governance.selectAbstain',
@@ -255,7 +255,7 @@ const messages = defineMessages({
},
registerStakingKey: {
id: 'components.governance.registerStakingKey',
- defaultMessage: '!!!Register staking key',
+ defaultMessage: '!!!Register staking key deposit',
},
enterDrepIDInfo: {
id: 'components.governance.enterDrepIDInfo',
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.tsx b/apps/wallet-mobile/src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.tsx
index 7180a1c471..093fa90e44 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.tsx
+++ b/apps/wallet-mobile/src/features/Staking/Governance/useCases/ChangeVote/ChangeVoteScreen.tsx
@@ -15,9 +15,8 @@ import {Spacer} from '../../../../../components/Spacer/Spacer'
import {useCreateGovernanceTx, useStakingKey} from '../../../../../yoroi-wallets/hooks'
import {useSelectedWallet} from '../../../../WalletManager/common/hooks/useSelectedWallet'
import {Action} from '../../common/Action/Action'
-import {mapStakingKeyStateToGovernanceAction} from '../../common/helpers'
+import {mapStakingKeyStateToGovernanceAction, useGovernanceActions} from '../../common/helpers'
import {LearnMoreLink} from '../../common/LearnMoreLink/LearnMoreLink'
-import {useNavigateTo} from '../../common/navigation'
import {useStrings} from '../../common/strings'
import {GovernanceVote} from '../../types'
import {EnterDrepIdModal} from '../EnterDrepIdModal/EnterDrepIdModal'
@@ -25,7 +24,6 @@ import {EnterDrepIdModal} from '../EnterDrepIdModal/EnterDrepIdModal'
export const ChangeVoteScreen = () => {
const strings = useStrings()
const {wallet, meta} = useSelectedWallet()
- const navigateTo = useNavigateTo()
const stakingKeyHash = useStakingKey(wallet)
const {data: stakingStatus} = useStakingKeyState(stakingKeyHash, {suspense: true})
const action = stakingStatus ? mapStakingKeyStateToGovernanceAction(stakingStatus) : null
@@ -33,6 +31,7 @@ export const ChangeVoteScreen = () => {
const {manager} = useGovernance()
const [pendingVote, setPendingVote] = React.useState(null)
const {styles} = useStyles()
+ const governanceActions = useGovernanceActions()
const {createCertificate: createDelegationCertificate, isLoading: isCreatingDelegationCertificate} =
useDelegationCertificate({
@@ -73,7 +72,11 @@ export const ChangeVoteScreen = () => {
certificates: [certificate],
addressMode: meta.addressMode,
})
- navigateTo.confirmTx({unsignedTx, vote})
+
+ governanceActions.handleDelegateAction({
+ unsignedTx,
+ drepID,
+ })
},
},
)
@@ -93,7 +96,10 @@ export const ChangeVoteScreen = () => {
certificates: [certificate],
addressMode: meta.addressMode,
})
- navigateTo.confirmTx({unsignedTx, vote})
+
+ governanceActions.handleAbstainAction({
+ unsignedTx,
+ })
},
},
)
@@ -112,7 +118,10 @@ export const ChangeVoteScreen = () => {
certificates: [certificate],
addressMode: meta.addressMode,
})
- navigateTo.confirmTx({unsignedTx, vote})
+
+ governanceActions.handleNoConfidenceAction({
+ unsignedTx,
+ })
},
},
)
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx b/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx
deleted file mode 100644
index 6e0a8327f9..0000000000
--- a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.stories.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import {NavigationRouteContext} from '@react-navigation/core'
-import {storiesOf} from '@storybook/react-native'
-import {GovernanceProvider} from '@yoroi/staking'
-import React from 'react'
-
-import {SafeArea} from '../../../../../components/SafeArea'
-import {mocks} from '../../../../../yoroi-wallets/mocks/wallet'
-import {WalletManagerProviderMock} from '../../../../../yoroi-wallets/mocks/WalletManagerProviderMock'
-import {mocks as governanceMocks} from '../../common/mocks'
-import {Routes} from '../../common/navigation'
-import {ConfirmTxScreen} from './ConfirmTxScreen'
-
-storiesOf('Governance/ConfirmTxScreen', module)
- .addDecorator((story) => {story()})
- .addDecorator((story) => (
-
- {story()}
-
- ))
- .add('Abstain', () => (
-
-
-
- ))
- .add('No Confidence', () => (
-
-
-
- ))
- .add('Delegate', () => (
-
-
-
- ))
- .add('Delegate And Register Staking Key', () => (
-
-
-
- ))
-
-const getContextValue = (vote: Routes['staking-gov-confirm-tx']['vote'], registerStakingKey = false) => ({
- key: 'key',
- name: 'name',
- params: {
- vote,
- unsignedTx: mocks.yoroiUnsignedTx,
- registerStakingKey,
- },
-})
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.tsx b/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.tsx
deleted file mode 100644
index 3cc7acdff6..0000000000
--- a/apps/wallet-mobile/src/features/Staking/Governance/useCases/ConfirmTx/ConfirmTxScreen.tsx
+++ /dev/null
@@ -1,293 +0,0 @@
-import {useFocusEffect} from '@react-navigation/native'
-import {useBech32DRepID, useUpdateLatestGovernanceAction} from '@yoroi/staking'
-import {useTheme} from '@yoroi/theme'
-import React from 'react'
-import {StyleSheet, View} from 'react-native'
-import {TouchableOpacity} from 'react-native-gesture-handler'
-
-import {Button} from '../../../../../components/Button/Button'
-import {ConfirmTxWithHwModal} from '../../../../../components/ConfirmTxWithHwModal/ConfirmTxWithHwModal'
-import {ConfirmTxWithOsModal} from '../../../../../components/ConfirmTxWithOsModal/ConfirmTxWithOsModal'
-import {ConfirmTxWithSpendingPasswordModal} from '../../../../../components/ConfirmTxWithSpendingPasswordModal/ConfirmTxWithSpendingPasswordModal'
-import {Icon} from '../../../../../components/Icon'
-import {useModal} from '../../../../../components/Modal/ModalContext'
-import {PairedBalance} from '../../../../../components/PairedBalance/PairedBalance'
-import {Space} from '../../../../../components/Space/Space'
-import {Spacer} from '../../../../../components/Spacer/Spacer'
-import {Text} from '../../../../../components/Text'
-import {useMetrics} from '../../../../../kernel/metrics/metricsManager'
-import {useUnsafeParams} from '../../../../../kernel/navigation'
-import {formatTokenWithText} from '../../../../../yoroi-wallets/utils/format'
-import {Amounts} from '../../../../../yoroi-wallets/utils/utils'
-import {useSelectedWallet} from '../../../../WalletManager/common/hooks/useSelectedWallet'
-import {Routes, useNavigateTo} from '../../common/navigation'
-import {useStrings} from '../../common/strings'
-import {GovernanceKindMap} from '../../types'
-
-export const ConfirmTxScreen = () => {
- const strings = useStrings()
- const {wallet, meta} = useSelectedWallet()
- const params = useUnsafeParams()
- const navigateTo = useNavigateTo()
- const {updateLatestGovernanceAction} = useUpdateLatestGovernanceAction(wallet.id)
- const {openModal, closeModal} = useModal()
- const [operationsOpen, setOperationsOpen] = React.useState(true)
- const {track} = useMetrics()
- const {styles} = useStyles()
-
- useFocusEffect(
- React.useCallback(() => {
- track.governanceConfirmTransactionPageViewed({
- governance_selection: GovernanceKindMap[params.vote.kind],
- })
- }, [params.vote.kind, track]),
- )
-
- const {data: bech32DrepId} = useBech32DRepID(params.vote.kind === 'delegate' ? params.vote.drepID : '', {
- enabled: params.vote.kind === 'delegate',
- })
-
- const titles = {
- abstain: strings.actionAbstainTitle,
- 'no-confidence': strings.actionNoConfidenceTitle,
- delegate: strings.actionDelegateToADRepTitle,
- }
-
- const descriptions = {
- abstain: strings.actionAbstainDescription,
- 'no-confidence': strings.actionNoConfidenceDescription,
- delegate: strings.actionDelegateToADRepDescription,
- }
-
- const operations = {
- abstain: strings.selectAbstain,
- 'no-confidence': strings.selectNoConfidence,
- delegate: strings.delegateVotingToDRep(params.vote.kind === 'delegate' ? bech32DrepId ?? params.vote.drepID : ''),
- }
-
- const title = titles[params.vote.kind]
- const description = descriptions[params.vote.kind]
- const operation = operations[params.vote.kind]
-
- const fee = params.unsignedTx.fee
- const feeAmount = Amounts.getAmount(fee, wallet.portfolioPrimaryTokenInfo.id)
- const feeText = formatTokenWithText(feeAmount.quantity, wallet.portfolioPrimaryTokenInfo)
-
- const onSuccess = (txID: string) => {
- if (params.vote.kind === 'delegate') {
- updateLatestGovernanceAction({kind: 'delegate-to-drep', drepID: params.vote.drepID, txID})
- }
-
- if (params.vote.kind === 'abstain') {
- updateLatestGovernanceAction({kind: 'vote', vote: 'abstain', txID})
- }
-
- if (params.vote.kind === 'no-confidence') {
- updateLatestGovernanceAction({kind: 'vote', vote: 'no-confidence', txID})
- }
-
- navigateTo.txSuccess({navigateToStaking: params.navigateToStakingOnSuccess ?? false, kind: params.vote.kind})
- }
-
- const onSubmit = () => {
- if (meta.isHW) {
- openModal(
- strings.signTransaction,
- onSuccess(signedTx.signedTx.id)}
- onNotSupportedCIP1694={() => {
- closeModal()
- navigateTo.notSupportedVersion()
- }}
- />,
- 400,
- )
- return
- }
-
- if (!meta.isHW && !meta.isEasyConfirmationEnabled) {
- openModal(
- strings.signTransaction,
- onSuccess(signedTx.signedTx.id)}
- onError={() => navigateTo.txFailed()}
- />,
- )
- return
- }
-
- if (!meta.isHW && meta.isEasyConfirmationEnabled) {
- openModal(
- strings.signTransaction,
- onSuccess(signedTx.signedTx.id)}
- onError={() => navigateTo.txFailed()}
- />,
- )
- return
- }
- }
-
- return (
-
-
-
- {title}
-
-
-
- {description}
-
-
-
-
-
- {strings.total}
-
- {feeText}
-
-
-
-
-
-
-
-
-
-
-
- {strings.transactionDetails}
-
-
-
- setOperationsOpen(!operationsOpen)}>
- {strings.operations}
-
-
-
-
- {operationsOpen && (
- <>
- {params.registerStakingKey && (
- <>
-
-
- {strings.registerStakingKey}
- >
- )}
-
-
-
- {operation}
- >
- )}
-
-
-
-
-
- {strings.txFees}
-
-
- {feeText}
-
-
-
-
-
-
-
-
- )
-}
-
-const useStyles = () => {
- const {color, atoms} = useTheme()
- const styles = StyleSheet.create({
- operationsToggle: {
- ...atoms.flex_row,
- ...atoms.justify_between,
- ...atoms.align_center,
- },
- feeLabel: {
- ...atoms.gap_sm,
- ...atoms.flex_1,
- ...atoms.justify_start,
- ...atoms.align_center,
- ...atoms.flex_row,
- },
- feesRow: {
- ...atoms.flex_row,
- ...atoms.justify_between,
- ...atoms.align_center,
- },
- root: {
- ...atoms.px_lg,
- ...atoms.flex_1,
- ...atoms.justify_between,
- backgroundColor: color.bg_color_max,
- },
- primaryText: {
- color: color.text_gray_medium,
- ...atoms.font_semibold,
- ...atoms.body_1_lg_medium,
- },
- secondaryText: {
- ...atoms.body_2_md_regular,
- color: color.text_gray_low,
- },
- row: {
- ...atoms.flex_row,
- ...atoms.justify_between,
- ...atoms.align_center,
- },
- totalsArea: {
- backgroundColor: '#3154cb',
- ...atoms.py_lg,
- ...atoms.px_lg,
- ...atoms.rounded_sm,
- },
- total: {
- fontFamily: 'Rubik-Regular',
- fontSize: 18,
- lineHeight: 26,
- color: color.white_static,
- },
- totalValue: {
- color: color.white_static,
- ...atoms.font_semibold,
- fontFamily: 'Rubik-Medium',
- fontSize: 18,
- lineHeight: 26,
- },
- fiatValue: {
- fontFamily: 'Rubik-Regular',
- fontSize: 14,
- lineHeight: 22,
- color: color.white_static,
- opacity: 0.5,
- },
- normalText: {
- color: color.text_gray_medium,
- ...atoms.font_normal,
- ...atoms.body_1_lg_regular,
- },
- feeValue: {
- color: color.gray_500,
- ...atoms.font_normal,
- ...atoms.body_1_lg_regular,
- },
- })
- return {styles}
-}
diff --git a/apps/wallet-mobile/src/features/Staking/Governance/useCases/Home/HomeScreen.tsx b/apps/wallet-mobile/src/features/Staking/Governance/useCases/Home/HomeScreen.tsx
index 9ab880aa80..9f43088d3e 100644
--- a/apps/wallet-mobile/src/features/Staking/Governance/useCases/Home/HomeScreen.tsx
+++ b/apps/wallet-mobile/src/features/Staking/Governance/useCases/Home/HomeScreen.tsx
@@ -28,7 +28,7 @@ import {
import {TransactionInfo} from '../../../../../yoroi-wallets/types/other'
import {useSelectedWallet} from '../../../../WalletManager/common/hooks/useSelectedWallet'
import {Action} from '../../common/Action/Action'
-import {mapStakingKeyStateToGovernanceAction} from '../../common/helpers'
+import {mapStakingKeyStateToGovernanceAction, useGovernanceActions} from '../../common/helpers'
import {LearnMoreLink} from '../../common/LearnMoreLink/LearnMoreLink'
import {Routes, useNavigateTo} from '../../common/navigation'
import {useStrings} from '../../common/strings'
@@ -94,7 +94,7 @@ const ParticipatingInGovernanceVariant = ({
isTxPending?: boolean
}) => {
const strings = useStrings()
- const styles = useStyles()
+ const {styles} = useStyles()
const navigateTo = useNavigateTo()
const {data: bech32DrepId} = useBech32DRepID(action.kind === 'delegate' ? action.drepID : '', {
enabled: action.kind === 'delegate',
@@ -180,7 +180,7 @@ const formattingOptions = (styles: any) => {
const NeverParticipatedInGovernanceVariant = () => {
const strings = useStrings()
- const styles = useStyles()
+ const {styles} = useStyles()
const navigateTo = useNavigateTo()
const {
wallet,
@@ -192,6 +192,7 @@ const NeverParticipatedInGovernanceVariant = () => {
const params = useUnsafeParams()
const {track} = useMetrics()
const [pendingVote, setPendingVote] = React.useState(null)
+ const governanceActions = useGovernanceActions()
useFocusEffect(
React.useCallback(() => {
@@ -199,8 +200,6 @@ const NeverParticipatedInGovernanceVariant = () => {
}, [track]),
)
- const navigateToStakingOnSuccess = params?.navigateToStakingOnSuccess ?? false
-
const hasStakingKeyRegistered = stakingInfo?.data?.status !== 'not-registered'
useWalletEvent(wallet, 'utxos', stakingInfo.refetch)
const needsToRegisterStakingKey = !hasStakingKeyRegistered
@@ -239,6 +238,7 @@ const NeverParticipatedInGovernanceVariant = () => {
openDRepIdModal(async (drepID) => {
const vote = {kind: 'delegate', drepID} as const
const stakingKey = await wallet.getStakingKey()
+
setPendingVote(vote.kind)
createDelegationCertificate(
@@ -250,7 +250,13 @@ const NeverParticipatedInGovernanceVariant = () => {
: null
const certs = stakeCert !== null ? [stakeCert, certificate] : [certificate]
const unsignedTx = await createGovernanceTxMutation.mutateAsync({certificates: certs, addressMode})
- navigateTo.confirmTx({unsignedTx, vote, registerStakingKey: stakeCert !== null, navigateToStakingOnSuccess})
+
+ governanceActions.handleDelegateAction({
+ unsignedTx,
+ drepID,
+ navigateToStakingOnSuccess: params?.navigateToStakingOnSuccess,
+ hasStakeCert: stakeCert !== null,
+ })
},
},
)
@@ -271,7 +277,12 @@ const NeverParticipatedInGovernanceVariant = () => {
: null
const certs = stakeCert !== null ? [stakeCert, certificate] : [certificate]
const unsignedTx = await createGovernanceTxMutation.mutateAsync({certificates: certs, addressMode})
- navigateTo.confirmTx({unsignedTx, vote, registerStakingKey: stakeCert !== null, navigateToStakingOnSuccess})
+
+ governanceActions.handleAbstainAction({
+ unsignedTx,
+ navigateToStakingOnSuccess: params?.navigateToStakingOnSuccess,
+ hasStakeCert: stakeCert !== null,
+ })
},
},
)
@@ -291,7 +302,12 @@ const NeverParticipatedInGovernanceVariant = () => {
: null
const certs = stakeCert !== null ? [stakeCert, certificate] : [certificate]
const unsignedTx = await createGovernanceTxMutation.mutateAsync({certificates: certs, addressMode})
- navigateTo.confirmTx({unsignedTx, vote, registerStakingKey: stakeCert !== null, navigateToStakingOnSuccess})
+
+ governanceActions.handleNoConfidenceAction({
+ unsignedTx,
+ navigateToStakingOnSuccess: params?.navigateToStakingOnSuccess,
+ hasStakeCert: stakeCert !== null,
+ })
},
},
)
@@ -377,5 +393,5 @@ const useStyles = () => {
},
})
- return styles
+ 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 28cf5c2bcc..320b3f56d7 100644
--- a/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
+++ b/apps/wallet-mobile/src/kernel/i18n/locales/en-US.json
@@ -147,7 +147,7 @@
"components.governance.changeDRep": "Change DRep",
"components.governance.confirm": "Confirm",
"components.governance.confirmTxTitle": "Confirm transaction",
- "components.governance.delegateVotingToDRep": "Delegate voting to\n{drepID}",
+ "components.governance.delegateVotingToDRep": "Delegate voting to",
"components.governance.delegatingToADRep": "Delegating to a DRep",
"components.governance.drepID": "Drep ID (fingerprint)",
"components.governance.drepKey": "DRep Key",
@@ -165,7 +165,7 @@
"components.governance.operations": "Operations",
"components.governance.participationBenefits": "Participating in the Cardano Governance gives you the opportunity to participate in the voting as well as withdraw your staking rewards",
"components.governance.readyToCollectRewards": "You are now ready to collect your rewards",
- "components.governance.registerStakingKey": "Register staking key",
+ "components.governance.registerStakingKey": "Register staking key deposit",
"components.governance.reviewActions": "Review the selections carefully to assign yourself a Governance Status",
"components.governance.selectAbstain": "Select abstain",
"components.governance.selectNoConfidence": "Select no confidence",
diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/cip30/cip30.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/cip30/cip30.test.ts
index ce03da0a48..06ea9e9790 100644
--- a/apps/wallet-mobile/src/yoroi-wallets/cardano/cip30/cip30.test.ts
+++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/cip30/cip30.test.ts
@@ -23,7 +23,6 @@ describe('cip30ExtensionMaker', () => {
})
it('should support getBalance', async () => {
- console.log('test-1')
const cip30 = cip30ExtensionMaker(mocks.wallet, mocks.walletMeta)
const result = await cip30.getBalance()
expect(result).toBeDefined()
diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/types.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/types.ts
index d80576eb94..172059076c 100644
--- a/apps/wallet-mobile/src/yoroi-wallets/cardano/types.ts
+++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/types.ts
@@ -10,7 +10,7 @@ import {
TxMetadata as TxMetadataType,
UnsignedTx as UnsignedTxType,
} from '@emurgo/yoroi-lib'
-import {App, HW, Network, Portfolio, Wallet} from '@yoroi/types'
+import {Api, App, HW, Network, Portfolio, Wallet} from '@yoroi/types'
import {BigNumber} from 'bignumber.js'
import {WalletEncryptedStorage} from '../../kernel/storage/EncryptedStorage'
@@ -58,6 +58,7 @@ export type Pagination = {
export interface YoroiWallet {
id: string
publicKeyHex: string
+ protocolParams: Api.Cardano.ProtocolParams
readonly portfolioPrimaryTokenInfo: Readonly
// ---------------------------------------------------------------------------------------
diff --git a/apps/wallet-mobile/src/yoroi-wallets/mocks/wallet.ts b/apps/wallet-mobile/src/yoroi-wallets/mocks/wallet.ts
index 92cb84b8f6..c5a50bacfd 100644
--- a/apps/wallet-mobile/src/yoroi-wallets/mocks/wallet.ts
+++ b/apps/wallet-mobile/src/yoroi-wallets/mocks/wallet.ts
@@ -11,7 +11,10 @@ import {Observable} from 'rxjs'
import {buildPortfolioTokenManagers} from '../../features/Portfolio/common/helpers/build-token-managers'
import {cardanoConfig} from '../../features/WalletManager/common/adapters/cardano/cardano-config'
-import {buildNetworkManagers} from '../../features/WalletManager/network-manager/network-manager'
+import {
+ buildNetworkManagers,
+ protocolParamsPlaceholder,
+} from '../../features/WalletManager/network-manager/network-manager'
import {toTokenInfo, utf8ToHex} from '../cardano/api/utils'
import {CardanoTypes, YoroiWallet} from '../cardano/types'
import {TransactionInfo} from '../types/other'
@@ -69,6 +72,7 @@ const wallet: YoroiWallet = {
allUtxos: utxos,
collateralId: '22d391c7a97559cb4784bd975214919618acce75cde573a7150a176700e76181:2',
accountVisual: 0,
+ protocolParams: protocolParamsPlaceholder,
balance$: new Observable(),
balances: {
diff --git a/apps/wallet-mobile/translations/messages/src/features/Staking/Governance/common/strings.json b/apps/wallet-mobile/translations/messages/src/features/Staking/Governance/common/strings.json
index cba4c77db8..d3941eca90 100644
--- a/apps/wallet-mobile/translations/messages/src/features/Staking/Governance/common/strings.json
+++ b/apps/wallet-mobile/translations/messages/src/features/Staking/Governance/common/strings.json
@@ -6,12 +6,12 @@
"start": {
"line": 76,
"column": 25,
- "index": 4821
+ "index": 4791
},
"end": {
"line": 79,
"column": 3,
- "index": 4928
+ "index": 4898
}
},
{
@@ -21,12 +21,12 @@
"start": {
"line": 80,
"column": 18,
- "index": 4948
+ "index": 4918
},
"end": {
"line": 83,
"column": 3,
- "index": 5047
+ "index": 5017
}
},
{
@@ -36,12 +36,12 @@
"start": {
"line": 84,
"column": 28,
- "index": 5077
+ "index": 5047
},
"end": {
"line": 87,
"column": 3,
- "index": 5194
+ "index": 5164
}
},
{
@@ -51,12 +51,12 @@
"start": {
"line": 88,
"column": 30,
- "index": 5226
+ "index": 5196
},
"end": {
"line": 91,
"column": 3,
- "index": 5336
+ "index": 5306
}
},
{
@@ -66,12 +66,12 @@
"start": {
"line": 92,
"column": 36,
- "index": 5374
+ "index": 5344
},
"end": {
"line": 96,
"column": 3,
- "index": 5579
+ "index": 5549
}
},
{
@@ -81,12 +81,12 @@
"start": {
"line": 97,
"column": 22,
- "index": 5603
+ "index": 5573
},
"end": {
"line": 100,
"column": 3,
- "index": 5694
+ "index": 5664
}
},
{
@@ -96,12 +96,12 @@
"start": {
"line": 101,
"column": 28,
- "index": 5724
+ "index": 5694
},
"end": {
"line": 104,
"column": 3,
- "index": 5889
+ "index": 5859
}
},
{
@@ -111,12 +111,12 @@
"start": {
"line": 105,
"column": 27,
- "index": 5918
+ "index": 5888
},
"end": {
"line": 108,
"column": 3,
- "index": 6020
+ "index": 5990
}
},
{
@@ -126,12 +126,12 @@
"start": {
"line": 109,
"column": 33,
- "index": 6055
+ "index": 6025
},
"end": {
"line": 112,
"column": 3,
- "index": 6225
+ "index": 6195
}
},
{
@@ -141,12 +141,12 @@
"start": {
"line": 113,
"column": 11,
- "index": 6238
+ "index": 6208
},
"end": {
"line": 116,
"column": 3,
- "index": 6319
+ "index": 6289
}
},
{
@@ -156,12 +156,12 @@
"start": {
"line": 117,
"column": 21,
- "index": 6342
+ "index": 6312
},
"end": {
"line": 120,
"column": 3,
- "index": 6445
+ "index": 6415
}
},
{
@@ -171,27 +171,27 @@
"start": {
"line": 121,
"column": 14,
- "index": 6461
+ "index": 6431
},
"end": {
"line": 124,
"column": 3,
- "index": 6547
+ "index": 6517
}
},
{
"id": "components.governance.delegateVotingToDRep",
- "defaultMessage": "!!!Delegate voting to \n{drepID}",
+ "defaultMessage": "!!!Delegate voting to",
"file": "src/features/Staking/Governance/common/strings.ts",
"start": {
"line": 125,
"column": 24,
- "index": 6573
+ "index": 6543
},
"end": {
"line": 128,
"column": 3,
- "index": 6688
+ "index": 6647
}
},
{
@@ -201,12 +201,12 @@
"start": {
"line": 129,
"column": 17,
- "index": 6707
+ "index": 6666
},
"end": {
"line": 132,
"column": 3,
- "index": 6800
+ "index": 6759
}
},
{
@@ -216,12 +216,12 @@
"start": {
"line": 133,
"column": 22,
- "index": 6824
+ "index": 6783
},
"end": {
"line": 136,
"column": 3,
- "index": 6928
+ "index": 6887
}
},
{
@@ -231,12 +231,12 @@
"start": {
"line": 137,
"column": 14,
- "index": 6944
+ "index": 6903
},
"end": {
"line": 140,
"column": 3,
- "index": 7030
+ "index": 6989
}
},
{
@@ -246,12 +246,12 @@
"start": {
"line": 141,
"column": 17,
- "index": 7049
+ "index": 7008
},
"end": {
"line": 144,
"column": 3,
- "index": 7167
+ "index": 7126
}
},
{
@@ -261,12 +261,12 @@
"start": {
"line": 145,
"column": 10,
- "index": 7179
+ "index": 7138
},
"end": {
"line": 148,
"column": 3,
- "index": 7272
+ "index": 7231
}
},
{
@@ -276,12 +276,12 @@
"start": {
"line": 149,
"column": 28,
- "index": 7302
+ "index": 7261
},
"end": {
"line": 152,
"column": 3,
- "index": 7433
+ "index": 7392
}
},
{
@@ -291,12 +291,12 @@
"start": {
"line": 153,
"column": 32,
- "index": 7467
+ "index": 7426
},
"end": {
"line": 156,
"column": 3,
- "index": 7595
+ "index": 7554
}
},
{
@@ -306,12 +306,12 @@
"start": {
"line": 157,
"column": 25,
- "index": 7622
+ "index": 7581
},
"end": {
"line": 161,
"column": 3,
- "index": 7850
+ "index": 7809
}
},
{
@@ -321,12 +321,12 @@
"start": {
"line": 162,
"column": 18,
- "index": 7870
+ "index": 7829
},
"end": {
"line": 165,
"column": 3,
- "index": 7966
+ "index": 7925
}
},
{
@@ -336,12 +336,12 @@
"start": {
"line": 166,
"column": 16,
- "index": 7984
+ "index": 7943
},
"end": {
"line": 169,
"column": 3,
- "index": 8078
+ "index": 8037
}
},
{
@@ -351,12 +351,12 @@
"start": {
"line": 170,
"column": 17,
- "index": 8097
+ "index": 8056
},
"end": {
"line": 173,
"column": 3,
- "index": 8246
+ "index": 8205
}
},
{
@@ -366,12 +366,12 @@
"start": {
"line": 174,
"column": 34,
- "index": 8282
+ "index": 8241
},
"end": {
"line": 177,
"column": 3,
- "index": 8438
+ "index": 8397
}
},
{
@@ -381,12 +381,12 @@
"start": {
"line": 178,
"column": 25,
- "index": 8465
+ "index": 8424
},
"end": {
"line": 182,
"column": 3,
- "index": 8679
+ "index": 8638
}
},
{
@@ -396,12 +396,12 @@
"start": {
"line": 183,
"column": 14,
- "index": 8695
+ "index": 8654
},
"end": {
"line": 186,
"column": 3,
- "index": 8782
+ "index": 8741
}
},
{
@@ -411,12 +411,12 @@
"start": {
"line": 187,
"column": 11,
- "index": 8795
+ "index": 8754
},
"end": {
"line": 190,
"column": 3,
- "index": 8875
+ "index": 8834
}
},
{
@@ -426,12 +426,12 @@
"start": {
"line": 191,
"column": 22,
- "index": 8899
+ "index": 8858
},
"end": {
"line": 194,
"column": 3,
- "index": 9002
+ "index": 8961
}
},
{
@@ -441,12 +441,12 @@
"start": {
"line": 195,
"column": 9,
- "index": 9013
+ "index": 8972
},
"end": {
"line": 198,
"column": 3,
- "index": 9089
+ "index": 9048
}
},
{
@@ -456,12 +456,12 @@
"start": {
"line": 199,
"column": 21,
- "index": 9112
+ "index": 9071
},
"end": {
"line": 202,
"column": 3,
- "index": 9213
+ "index": 9172
}
},
{
@@ -471,12 +471,12 @@
"start": {
"line": 203,
"column": 11,
- "index": 9226
+ "index": 9185
},
"end": {
"line": 206,
"column": 3,
- "index": 9363
+ "index": 9322
}
},
{
@@ -486,12 +486,12 @@
"start": {
"line": 207,
"column": 32,
- "index": 9397
+ "index": 9356
},
"end": {
"line": 210,
"column": 3,
- "index": 9563
+ "index": 9522
}
},
{
@@ -501,12 +501,12 @@
"start": {
"line": 211,
"column": 12,
- "index": 9577
+ "index": 9536
},
"end": {
"line": 214,
"column": 3,
- "index": 9660
+ "index": 9619
}
},
{
@@ -516,12 +516,12 @@
"start": {
"line": 215,
"column": 10,
- "index": 9672
+ "index": 9631
},
"end": {
"line": 218,
"column": 3,
- "index": 9751
+ "index": 9710
}
},
{
@@ -531,12 +531,12 @@
"start": {
"line": 219,
"column": 14,
- "index": 9767
+ "index": 9726
},
"end": {
"line": 222,
"column": 3,
- "index": 9860
+ "index": 9819
}
},
{
@@ -546,12 +546,12 @@
"start": {
"line": 223,
"column": 24,
- "index": 9886
+ "index": 9845
},
"end": {
"line": 226,
"column": 3,
- "index": 9988
+ "index": 9947
}
},
{
@@ -561,12 +561,12 @@
"start": {
"line": 227,
"column": 30,
- "index": 10020
+ "index": 9979
},
"end": {
"line": 231,
"column": 3,
- "index": 10311
+ "index": 10270
}
},
{
@@ -576,12 +576,12 @@
"start": {
"line": 232,
"column": 25,
- "index": 10338
+ "index": 10297
},
"end": {
"line": 235,
"column": 3,
- "index": 10450
+ "index": 10409
}
},
{
@@ -591,12 +591,12 @@
"start": {
"line": 236,
"column": 15,
- "index": 10467
+ "index": 10426
},
"end": {
"line": 239,
"column": 3,
- "index": 10560
+ "index": 10519
}
},
{
@@ -606,12 +606,12 @@
"start": {
"line": 240,
"column": 35,
- "index": 10597
+ "index": 10556
},
"end": {
"line": 243,
"column": 3,
- "index": 10729
+ "index": 10688
}
},
{
@@ -621,12 +621,12 @@
"start": {
"line": 244,
"column": 34,
- "index": 10765
+ "index": 10724
},
"end": {
"line": 247,
"column": 3,
- "index": 10939
+ "index": 10898
}
},
{
@@ -636,12 +636,12 @@
"start": {
"line": 248,
"column": 14,
- "index": 10955
+ "index": 10914
},
"end": {
"line": 251,
"column": 3,
- "index": 11043
+ "index": 11002
}
},
{
@@ -651,27 +651,27 @@
"start": {
"line": 252,
"column": 10,
- "index": 11055
+ "index": 11014
},
"end": {
"line": 255,
"column": 3,
- "index": 11142
+ "index": 11101
}
},
{
"id": "components.governance.registerStakingKey",
- "defaultMessage": "!!!Register staking key",
+ "defaultMessage": "!!!Register staking key deposit",
"file": "src/features/Staking/Governance/common/strings.ts",
"start": {
"line": 256,
"column": 22,
- "index": 11166
+ "index": 11125
},
"end": {
"line": 259,
"column": 3,
- "index": 11270
+ "index": 11237
}
},
{
@@ -681,12 +681,12 @@
"start": {
"line": 260,
"column": 19,
- "index": 11291
+ "index": 11258
},
"end": {
"line": 263,
"column": 3,
- "index": 11447
+ "index": 11414
}
},
{
@@ -696,12 +696,12 @@
"start": {
"line": 264,
"column": 15,
- "index": 11464
+ "index": 11431
},
"end": {
"line": 267,
"column": 3,
- "index": 11554
+ "index": 11521
}
},
{
@@ -711,12 +711,12 @@
"start": {
"line": 268,
"column": 25,
- "index": 11581
+ "index": 11548
},
"end": {
"line": 271,
"column": 3,
- "index": 11710
+ "index": 11677
}
},
{
@@ -726,12 +726,12 @@
"start": {
"line": 272,
"column": 28,
- "index": 11740
+ "index": 11707
},
"end": {
"line": 275,
"column": 3,
- "index": 11835
+ "index": 11802
}
},
{
@@ -741,12 +741,12 @@
"start": {
"line": 276,
"column": 34,
- "index": 11871
+ "index": 11838
},
"end": {
"line": 279,
"column": 3,
- "index": 12031
+ "index": 11998
}
},
{
@@ -756,12 +756,12 @@
"start": {
"line": 280,
"column": 29,
- "index": 12062
+ "index": 12029
},
"end": {
"line": 283,
"column": 3,
- "index": 12175
+ "index": 12142
}
},
{
@@ -771,12 +771,12 @@
"start": {
"line": 284,
"column": 22,
- "index": 12199
+ "index": 12166
},
"end": {
"line": 287,
"column": 3,
- "index": 12323
+ "index": 12290
}
}
]
\ No newline at end of file