Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo committed Jun 10, 2024
1 parent fdf83b5 commit 2d190c2
Show file tree
Hide file tree
Showing 15 changed files with 138 additions and 154 deletions.
2 changes: 1 addition & 1 deletion apps/wallet-mobile/.storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@emurgo/csl-mobile-bridge": "6.0.0-alpha.9",
"@emurgo/react-native-blockies-svg": "^0.0.2",
"@emurgo/react-native-hid": "^5.15.6",
"@emurgo/yoroi-lib": "0.15.5-alpha.7",
"@emurgo/yoroi-lib": "0.15.5-alpha.8",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
Expand Down Expand Up @@ -127,11 +127,11 @@
"@yoroi/exchange": "2.0.1",
"@yoroi/links": "1.5.4",
"@yoroi/resolver": "2.0.5",
"@yoroi/setup-wallet": "1.0.0",
"@yoroi/staking": "1.5.1",
"@yoroi/swap": "1.5.2",
"@yoroi/theme": "^1.0.0",
"@yoroi/transfer": "1.0.0",
"@yoroi/setup-wallet": "1.0.0",
"add": "2.0.6",
"assert": "^2.0.0",
"axios": "^1.5.0",
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/src/Staking/FailedTx/FailedTxScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const useNavigateTo = () => {

return {
buyAda: () =>
navigation.navigate('app-root', {
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'history',
Expand All @@ -49,7 +49,7 @@ const useNavigateTo = () => {
},
}),
main: () =>
navigation.navigate('app-root', {
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'history',
Expand Down
34 changes: 18 additions & 16 deletions apps/wallet-mobile/src/Staking/PoolTransition/usePoolTransition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ import * as React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {useQuery} from 'react-query'

import {features} from '../../../features'
import {useSelectedWallet} from '../../../features/WalletManager/context/SelectedWalletContext'
import {getCardanoNetworkConfigById} from '../../../yoroi-wallets/cardano/networks'
import {YoroiWallet} from '../../../yoroi-wallets/cardano/types'
import {asQuantity, Quantities} from '../../../yoroi-wallets/utils'
import {useStakingInfo} from '../../Dashboard/StakePoolInfos'
import {features} from '../../features'
import {useSelectedWallet} from '../../features/WalletManager/Context'
import {useSelectedWallet} from '../../features/WalletManager/Context/SelectedWalletContext'
import {getCardanoNetworkConfigById} from '../../yoroi-wallets/cardano/networks'
import {YoroiWallet} from '../../yoroi-wallets/cardano/types'
import {asQuantity, Quantities} from '../../yoroi-wallets/utils'

Expand Down Expand Up @@ -57,23 +53,29 @@ export const usePoolTransition = () => {
const navigateToUpdate = React.useCallback(async () => {
try {
const yoroiUnsignedTx = await createDelegationTx(wallet, poolId)
navigation.navigate('app-root', {
screen: 'staking-dashboard',
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'delegation-confirmation',
initial: false,
screen: 'staking-dashboard',
params: {
poolId,
yoroiUnsignedTx,
screen: 'delegation-confirmation',
initial: false,
params: {
poolId,
yoroiUnsignedTx,
},
},
},
})
} catch (err) {
navigation.navigate('app-root', {
screen: 'staking-dashboard',
navigation.navigate('manage-wallets', {
screen: 'main-wallet-routes',
params: {
screen: 'delegation-failed-tx',
initial: false,
screen: 'staking-dashboard',
params: {
screen: 'delegation-failed-tx',
initial: false,
},
},
})
}
Expand Down
14 changes: 2 additions & 12 deletions apps/wallet-mobile/src/Staking/StakingCenter/StakingCenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ import {defineMessages, useIntl} from 'react-intl'
import {View} from 'react-native'
import {WebView, WebViewMessageEvent} from 'react-native-webview'

import {PleaseWaitModal, Spacer} from '../../../components'
import {features} from '../../../features'
import {useSelectedWallet} from '../../../features/WalletManager/context/SelectedWalletContext'
import {showErrorDialog} from '../../../kernel/dialogs'
import {isNightly} from '../../../kernel/env'
import {useLanguage} from '../../../kernel/i18n'
import globalMessages from '../../../kernel/i18n/global-messages'
import {useMetrics} from '../../../kernel/metrics/metricsManager'
import {StakingCenterRouteNavigation} from '../../../kernel/navigation'
import {NETWORKS} from '../../../yoroi-wallets/cardano/networks'
import {NotEnoughMoneyToSendError} from '../../../yoroi-wallets/cardano/types'
import {usePlate} from '../../../yoroi-wallets/hooks'
import {PleaseWaitModal, Spacer} from '../../components'
import {useStakingTx} from '../../Dashboard/StakePoolInfos'
import {showErrorDialog} from '../../dialogs'
import {features} from '../../features'
Expand All @@ -29,6 +18,7 @@ import {useMetrics} from '../../metrics/metricsManager'
import {StakingCenterRouteNavigation} from '../../navigation'
import {getNetworkConfigById, NETWORKS} from '../../yoroi-wallets/cardano/networks'
import {NotEnoughMoneyToSendError} from '../../yoroi-wallets/cardano/types'
import {usePlate} from '../../yoroi-wallets/hooks'
import {PoolDetailScreen} from '../PoolDetails'

export const StakingCenter = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet-mobile/src/components/Modal/ModalScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const useStyles = () => {
},
sheet: {
flex: 1,
backgroundColor: color.gray_cmin,
backgroundColor: color.gray['min'],
alignSelf: 'stretch',
paddingHorizontal: 16,
paddingBottom: 16,
Expand Down
13 changes: 0 additions & 13 deletions apps/wallet-mobile/src/features/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import {useCanVote} from '../../Catalyst/hooks'
import {InsufficientFundsModal} from '../../Catalyst/InsufficientFundsModal'
import {Boundary, Icon, Spacer, Text} from '../../components'
import {usePrefetchStakingInfo} from '../../Dashboard/StakePoolInfos'
import {CONFIG} from '../../legacy/config'
import {useMetrics} from '../../metrics/metricsManager'
import {defaultStackNavigationOptions, useWalletNavigation} from '../../navigation'
import {usePoolTransition} from '../../Staking/PoolTransition/usePoolTransition'
import {useIsGovernanceFeatureEnabled} from '../Staking/Governance'
import {useSelectedWallet} from '../WalletManager/Context/SelectedWalletContext'

Expand Down Expand Up @@ -43,7 +41,6 @@ export const Menu = () => {
const {styles, color} = useStyles()
const navigateTo = useNavigateTo()
const wallet = useSelectedWallet()
const {isPoolRetiring} = usePoolTransition()
const {track} = useMetrics()

useFocusEffect(
Expand All @@ -62,15 +59,6 @@ export const Menu = () => {
left={<Icon.Gear size={24} color={color.gray['600']} />}
/>

{CONFIG.DAPP_EXPLORER_ENABLED && (
<Staking
label={strings.stakingCenter}
onPress={navigateTo.stakingCenter}
left={<Icon.TabStaking size={24} color={color.gray_c600} />}
right={isPoolRetiring ? <Icon.Warning size={24} color={color.sys_magenta_c500} /> : null}
/>
)}

{isGovernanceFeatureEnabled && (
<Governance
label={strings.governanceCentre}
Expand Down Expand Up @@ -161,7 +149,6 @@ const Item = ({
)
}

const Staking = Item
const Governance = Item
const AppSettings = Item
const KnowledgeBase = Item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {useQuery, UseQueryOptions} from 'react-query'

import {toCardanoNetworkId} from '../../../yoroi-wallets/cardano/utils'
import {CardanoMobile} from '../../../yoroi-wallets/wallets'
import {useSelectedWallet} from '../../WalletManager/context/SelectedWalletContext'
import {useSelectedWallet} from '../../WalletManager/Context/SelectedWalletContext'
import {AddressErrorInvalid, AddressErrorWrongNetwork} from './errors'

export const useSendAddress = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"defaultMessage": "!!!Go to Staking Center",
"file": "src/Dashboard/Dashboard.tsx",
"start": {
"line": 240,
"line": 252,
"column": 23,
"index": 7906
"index": 8064
},
"end": {
"line": 243,
"line": 255,
"column": 3,
"index": 8039
"index": 8197
}
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"start": {
"line": 65,
"column": 9,
"index": 2064
"index": 2086
},
"end": {
"line": 68,
"column": 3,
"index": 2152
"index": 2174
}
}
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,59 @@
"defaultMessage": "!!!Not enough funds",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 104,
"line": 105,
"column": 18,
"index": 2490
"index": 2563
},
"end": {
"line": 107,
"line": 108,
"column": 3,
"index": 2606
"index": 2679
}
},
{
"id": "components.stakingcenter.failedDelegation.noFundsToProcess",
"defaultMessage": "!!!Your transaction cannot be processed due to lack of funds on your wallet balance",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 108,
"line": 109,
"column": 20,
"index": 2628
"index": 2701
},
"end": {
"line": 111,
"line": 112,
"column": 3,
"index": 2810
"index": 2883
}
},
{
"id": "components.stakingcenter.failedDelegation.buyAda",
"defaultMessage": "!!!Buy ada",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 112,
"line": 113,
"column": 10,
"index": 2822
"index": 2895
},
"end": {
"line": 115,
"line": 116,
"column": 3,
"index": 2921
"index": 2994
}
},
{
"id": "components.stakingcenter.failedDelegation.goToMain",
"defaultMessage": "!!!Go to main wallet page",
"file": "src/Staking/FailedTx/FailedTxScreen.tsx",
"start": {
"line": 116,
"line": 117,
"column": 12,
"index": 2935
"index": 3008
},
"end": {
"line": 119,
"line": 120,
"column": 3,
"index": 3051
"index": 3124
}
}
]
]
Loading

0 comments on commit 2d190c2

Please sign in to comment.