Skip to content

Commit

Permalink
fix(wallet-mobile): Use correct route when navigating to staking when…
Browse files Browse the repository at this point in the history
… dApp explorer is enabled
  • Loading branch information
michaeljscript committed May 20, 2024
1 parent fb225e2 commit 6d18481
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 87 deletions.
1 change: 0 additions & 1 deletion apps/wallet-mobile/src/TxHistory/TxHistoryNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from '@yoroi/swap'
import {Atoms, ThemedPalette, useTheme} from '@yoroi/theme'
import {Resolver, Swap} from '@yoroi/types'
import _ from 'lodash'
import React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {StyleSheet, Text, TouchableOpacity, TouchableOpacityProps, View, ViewProps} from 'react-native'
Expand Down
11 changes: 11 additions & 0 deletions apps/wallet-mobile/src/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {Dimensions, TouchableOpacity, TouchableOpacityProps, ViewStyle} from 're
import {Icon} from './components'
import {ScanFeature} from './features/Scan/common/types'
import {Routes as StakingGovernanceRoutes} from './features/Staking/Governance/common/navigation'
import {CONFIG} from './legacy/config'
import {YoroiUnsignedTx} from './yoroi-wallets/types'

// prettier-ignore
Expand Down Expand Up @@ -503,6 +504,16 @@ export const useWalletNavigation = () => {
},

navigateToStakingDashboard: () => {
if (CONFIG.DAPP_EXPLORER_ENABLED) {
navigation.navigate('manage-wallets', {
screen: 'staking-dashboard',
params: {
screen: 'staking-dashboard-main',
},
})
return
}

navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"start": {
"line": 240,
"column": 23,
"index": 7928
"index": 7948
},
"end": {
"line": 243,
"column": 3,
"index": 8061
"index": 8081
}
}
]

0 comments on commit 6d18481

Please sign in to comment.