diff --git a/CHANGELOG.md b/CHANGELOG.md index 9858b0632ba..59c0d96cf0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - changed: `FiatProviderError` messages now include `FiatProviderQuoteError` info. - changed: Various strings updated to UK compliance spec - changed: Track array of errors or AggregateErrors separately with a common tag +- changed: Use stack-specific scene navigation props instead of `NavigationProp` - changed: Wording in light account persistent notification - fixed: Fix error massaging in trackError - fixed: Normalized error messages for tracking; removing localization from error messages. diff --git a/src/__tests__/scenes/ChangePasswordScene.test.tsx b/src/__tests__/scenes/ChangePasswordScene.test.tsx index 2acddde40a7..4ee6d2cd15c 100644 --- a/src/__tests__/scenes/ChangePasswordScene.test.tsx +++ b/src/__tests__/scenes/ChangePasswordScene.test.tsx @@ -5,7 +5,7 @@ import { createRenderer } from 'react-test-renderer/shallow' import { ChangePasswordScene } from '../../components/scenes/ChangePasswordScene' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' import { fakeRootState } from '../../util/fake/fakeRootState' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('ChangePasswordScene', () => { it('should render with loading props', () => { @@ -14,7 +14,7 @@ describe('ChangePasswordScene', () => { const actual = renderer.render( - + ) diff --git a/src/__tests__/scenes/ChangePinScene.test.tsx b/src/__tests__/scenes/ChangePinScene.test.tsx index a79235f4882..cfeeed5969f 100644 --- a/src/__tests__/scenes/ChangePinScene.test.tsx +++ b/src/__tests__/scenes/ChangePinScene.test.tsx @@ -5,7 +5,7 @@ import { createRenderer } from 'react-test-renderer/shallow' import { ChangePinScene } from '../../components/scenes/ChangePinScene' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' import { fakeRootState } from '../../util/fake/fakeRootState' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('ChangePinComponent', () => { it('should render with loading props', () => { @@ -14,7 +14,7 @@ describe('ChangePinComponent', () => { const actual = renderer.render( - + ) diff --git a/src/__tests__/scenes/CreateWalletAccountSetupScene.test.tsx b/src/__tests__/scenes/CreateWalletAccountSetupScene.test.tsx index bbf6f6b93a4..25bd162b09d 100644 --- a/src/__tests__/scenes/CreateWalletAccountSetupScene.test.tsx +++ b/src/__tests__/scenes/CreateWalletAccountSetupScene.test.tsx @@ -5,7 +5,7 @@ import TestRenderer from 'react-test-renderer' import { CreateWalletAccountSetupScene } from '../../components/scenes/CreateWalletAccountSetupScene' import { btcCurrencyInfo } from '../../util/fake/fakeBtcInfo' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('CreateWalletAccountSelect', () => { it('renders', () => { @@ -26,7 +26,7 @@ describe('CreateWalletAccountSelect', () => { const renderer = TestRenderer.create( { const mockState: FakeState = { @@ -54,7 +54,7 @@ describe('CreateWalletEditNameComponent', () => { const renderer = TestRenderer.create( { const KeyboardAwareScrollView = (blob: { children: React.ReactNode }) => blob.children @@ -33,7 +33,7 @@ describe('CreateWalletImportScene', () => { const renderer = TestRenderer.create( { const mockState: FakeState = { @@ -88,7 +88,7 @@ describe('CreateWalletSelectCrypto', () => { it('should render with loading props', () => { const renderer = TestRenderer.create( - + ) diff --git a/src/__tests__/scenes/CurrencyNotificationScene.test.tsx b/src/__tests__/scenes/CurrencyNotificationScene.test.tsx index 472cb4cd944..318a5eb4629 100644 --- a/src/__tests__/scenes/CurrencyNotificationScene.test.tsx +++ b/src/__tests__/scenes/CurrencyNotificationScene.test.tsx @@ -4,7 +4,7 @@ import TestRenderer from 'react-test-renderer' import { CurrencyNotificationScene } from '../../components/scenes/CurrencyNotificationScene' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('CurrencyNotificationComponent', () => { const mockStore: FakeState = { @@ -24,7 +24,7 @@ describe('CurrencyNotificationComponent', () => { const renderer = TestRenderer.create( { it('should render', () => { @@ -37,7 +37,7 @@ describe('CurrencySettings', () => { const renderer = TestRenderer.create( diff --git a/src/__tests__/scenes/DefaultFiatSettingScene.test.tsx b/src/__tests__/scenes/DefaultFiatSettingScene.test.tsx index 0a4f69d2704..116f39808e4 100644 --- a/src/__tests__/scenes/DefaultFiatSettingScene.test.tsx +++ b/src/__tests__/scenes/DefaultFiatSettingScene.test.tsx @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow' import { DefaultFiatSettingComponent } from '../../components/scenes/DefaultFiatSettingScene' import { getTheme } from '../../components/services/ThemeContext' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('DefaultFiatSettingComponent', () => { it('should render with loading props', () => { @@ -12,7 +12,7 @@ describe('DefaultFiatSettingComponent', () => { const actual = renderer.render( { const renderer = TestRenderer.create( diff --git a/src/__tests__/scenes/FioAddressDetailsScene.test.tsx b/src/__tests__/scenes/FioAddressDetailsScene.test.tsx index 115fe12efdc..7411bd721de 100644 --- a/src/__tests__/scenes/FioAddressDetailsScene.test.tsx +++ b/src/__tests__/scenes/FioAddressDetailsScene.test.tsx @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow' import { FioAddressDetails } from '../../components/scenes/Fio/FioAddressDetailsScene' import { getTheme } from '../../components/services/ThemeContext' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('FioAddressDetails', () => { it('should render with loading props', () => { @@ -24,7 +24,7 @@ describe('FioAddressDetails', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -23,7 +23,7 @@ describe('FioAddressList', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -23,7 +23,7 @@ describe('FioAddressRegister', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -12,7 +12,7 @@ describe('FioAddressRegistered', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -12,7 +12,7 @@ describe('FioAddressRegistered', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -24,7 +24,7 @@ describe('FioAddressSettingsComponent', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -24,7 +24,7 @@ describe('FioConnectWalletConfirm', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -20,7 +20,7 @@ describe('FioDomainRegister', () => { const actual = renderer.render( { it('should render with loading props', () => { @@ -12,7 +12,7 @@ describe('Request', () => { const actual = renderer.render( { const actual = renderer.render( { const actual = renderer.render( { const renderer = TestRenderer.create( { const renderer = TestRenderer.create( { const renderer = TestRenderer.create( { const renderer = TestRenderer.create( { // Hide Address const renderer = TestRenderer.create( - + ) expect(renderer.toJSON()).toMatchSnapshot() @@ -209,7 +209,7 @@ describe('SendScene2', () => { params.hiddenFeaturesMap = { amount: true } const renderer2 = TestRenderer.create( - + ) expect(renderer2.toJSON()).toMatchSnapshot() @@ -218,7 +218,7 @@ describe('SendScene2', () => { params.hiddenFeaturesMap = { amount: true, address: true } const renderer3 = TestRenderer.create( - + ) expect(renderer3.toJSON()).toMatchSnapshot() @@ -245,7 +245,7 @@ describe('SendScene2', () => { // Lock Address const renderer = TestRenderer.create( - + ) expect(renderer.toJSON()).toMatchSnapshot() @@ -254,7 +254,7 @@ describe('SendScene2', () => { params.lockTilesMap = { amount: true } const renderer2 = TestRenderer.create( - + ) expect(renderer2.toJSON()).toMatchSnapshot() @@ -263,7 +263,7 @@ describe('SendScene2', () => { params.lockTilesMap = { amount: true, address: true } const renderer3 = TestRenderer.create( - + ) expect(renderer3.toJSON()).toMatchSnapshot() diff --git a/src/__tests__/scenes/SettingsScene.test.tsx b/src/__tests__/scenes/SettingsScene.test.tsx index b12980f456c..dfb33f32fa2 100644 --- a/src/__tests__/scenes/SettingsScene.test.tsx +++ b/src/__tests__/scenes/SettingsScene.test.tsx @@ -4,7 +4,7 @@ import TestRenderer from 'react-test-renderer' import { SettingsScene } from '../../components/scenes/SettingsScene' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' describe('SettingsScene', () => { const mockState: FakeState = { @@ -25,7 +25,7 @@ describe('SettingsScene', () => { it('should render SettingsScene', () => { const renderer = TestRenderer.create( - + ) diff --git a/src/__tests__/scenes/SwapSuccessScene.test.tsx b/src/__tests__/scenes/SwapSuccessScene.test.tsx index 5a6368f093a..19f42ddb85e 100644 --- a/src/__tests__/scenes/SwapSuccessScene.test.tsx +++ b/src/__tests__/scenes/SwapSuccessScene.test.tsx @@ -5,7 +5,7 @@ import TestRenderer from 'react-test-renderer' import { SwapSuccessScene } from '../../components/scenes/SwapSuccessScene' import { FakeProviders, FakeState } from '../../util/fake/FakeProviders' -import { fakeSceneProps } from '../../util/fake/fakeSceneProps' +import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps' const currencyInfo: EdgeCurrencyInfo = { pluginId: 'bitcoin', @@ -63,7 +63,7 @@ describe('SwapSuccessSceneComponent', () => { const renderer = TestRenderer.create( { const renderer = TestRenderer.create( { const renderer = TestRenderer.create( diff --git a/src/actions/LoginActions.tsx b/src/actions/LoginActions.tsx index 6c9d33b274b..a75b475e12e 100644 --- a/src/actions/LoginActions.tsx +++ b/src/actions/LoginActions.tsx @@ -18,7 +18,7 @@ import { AccountInitPayload, initialState } from '../reducers/scenes/SettingsRed import { WalletCreateItem } from '../selectors/getCreateWalletList' import { config } from '../theme/appConfig' import { Dispatch, ThunkAction } from '../types/reduxTypes' -import { NavigationBase, NavigationProp } from '../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../types/routerTypes' import { currencyCodesToEdgeAssets } from '../util/CurrencyInfoHelpers' import { logActivity } from '../util/logger' import { logEvent, trackError } from '../util/tracking' @@ -86,7 +86,7 @@ export function initializeAccount(navigation: NavigationBase, account: EdgeAccou await readLocalAccountSettings(account) const newAccountFlow = async ( - navigation: NavigationProp<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'>, + navigation: EdgeAppSceneProps<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'>['navigation'], items: WalletCreateItem[] ) => { navigation.replace('edgeTabs', { screen: 'home' }) @@ -110,7 +110,11 @@ export function initializeAccount(navigation: NavigationBase, account: EdgeAccou screen: 'edgeAppStack', params: { screen: 'createWalletSelectCryptoNewAccount', - params: { newAccountFlow, defaultSelection, disableLegacy: true } + params: { + newAccountFlow, + defaultSelection, + disableLegacy: true + } } }) diff --git a/src/components/rows/CoinRankRow.tsx b/src/components/rows/CoinRankRow.tsx index 8312490dbe6..dd9caaa3216 100644 --- a/src/components/rows/CoinRankRow.tsx +++ b/src/components/rows/CoinRankRow.tsx @@ -8,7 +8,7 @@ import { formatFiatString } from '../../hooks/useFiatText' import { useHandler } from '../../hooks/useHandler' import { toPercentString } from '../../locales/intl' import { AssetSubText, CoinRanking, CoinRankingData, PercentChangeTimeFrame } from '../../types/coinrankTypes' -import { NavigationProp } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { triggerHaptic } from '../../util/haptic' import { debugLog, LOG_COINRANK } from '../../util/logger' import { DECIMAL_PRECISION } from '../../util/utils' @@ -21,7 +21,7 @@ interface Props { coinRanking: CoinRanking index: number fiatCurrencyCode: string - navigation: NavigationProp<'coinRanking'> + navigation: EdgeAppSceneProps<'coinRanking'>['navigation'] percentChangeTimeFrame: PercentChangeTimeFrame } diff --git a/src/components/scenes/AssetSettingsScene.tsx b/src/components/scenes/AssetSettingsScene.tsx index 72af2f1ebba..d489aff4556 100644 --- a/src/components/scenes/AssetSettingsScene.tsx +++ b/src/components/scenes/AssetSettingsScene.tsx @@ -5,14 +5,14 @@ import { CURRENCY_SETTINGS_KEYS } from '../../constants/WalletAndCurrencyConstan import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' import { CryptoIcon } from '../icons/CryptoIcon' import { showToast } from '../services/AirshipInstance' import { cacheStyles, Theme, useTheme } from '../services/ThemeContext' import { SettingsTappableRow } from '../settings/SettingsTappableRow' -interface Props extends EdgeSceneProps<'assetSettings'> {} +interface Props extends EdgeAppSceneProps<'assetSettings'> {} export function AssetSettingsScene(props: Props) { const { navigation } = props diff --git a/src/components/scenes/ChangeMiningFeeScene.tsx b/src/components/scenes/ChangeMiningFeeScene.tsx index 5923c0f7599..c60b7e3a4fd 100644 --- a/src/components/scenes/ChangeMiningFeeScene.tsx +++ b/src/components/scenes/ChangeMiningFeeScene.tsx @@ -8,7 +8,7 @@ import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' import { FEE_STRINGS } from '../../constants/WalletAndCurrencyConstants' import { useIconColor } from '../../hooks/useIconColor' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { FeeOption } from '../../types/types' import { darkenHexColor } from '../../util/utils' import { AccentColors } from '../common/DotsBackground' @@ -29,7 +29,7 @@ export interface ChangeMiningFeeParams { onSubmit: (networkFeeOption: FeeOption, customNetworkFee: JsonObject) => void } -interface OwnProps extends EdgeSceneProps<'changeMiningFee2'> { +interface OwnProps extends EdgeAppSceneProps<'changeMiningFee2'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/ChangePasswordScene.tsx b/src/components/scenes/ChangePasswordScene.tsx index e2dc0e2fd86..9acf7835f8a 100644 --- a/src/components/scenes/ChangePasswordScene.tsx +++ b/src/components/scenes/ChangePasswordScene.tsx @@ -3,12 +3,12 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logActivity } from '../../util/logger' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' -interface Props extends EdgeSceneProps<'changePassword'> {} +interface Props extends EdgeAppSceneProps<'changePassword'> {} export const ChangePasswordScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/ChangePinScene.tsx b/src/components/scenes/ChangePinScene.tsx index 747f58c1cb1..827e10130f2 100644 --- a/src/components/scenes/ChangePinScene.tsx +++ b/src/components/scenes/ChangePinScene.tsx @@ -3,12 +3,12 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logActivity } from '../../util/logger' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' -interface Props extends EdgeSceneProps<'changePin'> {} +interface Props extends EdgeAppSceneProps<'changePin'> {} export const ChangePinScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/CoinRankingDetailsScene.tsx b/src/components/scenes/CoinRankingDetailsScene.tsx index aaec97c3df3..1cfcd5db34c 100644 --- a/src/components/scenes/CoinRankingDetailsScene.tsx +++ b/src/components/scenes/CoinRankingDetailsScene.tsx @@ -9,7 +9,7 @@ import { lstrings } from '../../locales/strings' import { getDefaultFiat } from '../../selectors/SettingsSelectors' import { CoinRankingData, CoinRankingDataPercentChange } from '../../types/coinrankTypes' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { formatLargeNumberString as formatLargeNumber } from '../../util/utils' import { SwipeChart } from '../charts/SwipeChart' import { EdgeAnim, fadeInLeft } from '../common/EdgeAnim' @@ -25,7 +25,7 @@ export interface CoinRankingDetailsParams { fiatCurrencyCode: string } -interface Props extends EdgeSceneProps<'coinRankingDetails'> {} +interface Props extends EdgeAppSceneProps<'coinRankingDetails'> {} const COINRANKINGDATA_TITLE_MAP: { [key: string]: string } = { currencyCode: '', diff --git a/src/components/scenes/CoinRankingScene.tsx b/src/components/scenes/CoinRankingScene.tsx index e04bc7761c6..9cd402e08f6 100644 --- a/src/components/scenes/CoinRankingScene.tsx +++ b/src/components/scenes/CoinRankingScene.tsx @@ -11,7 +11,7 @@ import { FooterRender } from '../../state/SceneFooterState' import { useSceneScrollHandler } from '../../state/SceneScrollState' import { asCoinranking, AssetSubText, CoinRanking, PercentChangeTimeFrame } from '../../types/coinrankTypes' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { debugLog, enableDebugLogType, LOG_COINRANK } from '../../util/logger' import { fetchRates } from '../../util/network' import { EdgeAnim, MAX_LIST_ITEMS_ANIM } from '../common/EdgeAnim' @@ -76,7 +76,7 @@ export const COINGECKO_SUPPORTED_FIATS = { // Masking enable bit with 0 disables logging enableDebugLogType(LOG_COINRANK & 0) -interface Props extends EdgeSceneProps<'coinRanking'> {} +interface Props extends EdgeAppSceneProps<'coinRanking'> {} const percentChangeOrder: PercentChangeTimeFrame[] = ['hours1', 'hours24', 'days7', 'days30', 'year1'] const percentChangeStrings: { [pc: string]: string } = { diff --git a/src/components/scenes/ConfirmScene.tsx b/src/components/scenes/ConfirmScene.tsx index 6e38530ed18..7092f06de68 100644 --- a/src/components/scenes/ConfirmScene.tsx +++ b/src/components/scenes/ConfirmScene.tsx @@ -5,7 +5,7 @@ import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { EdgeButton } from '../buttons/EdgeButton' import { SceneWrapper } from '../common/SceneWrapper' import { EdgeRow } from '../rows/EdgeRow' @@ -14,7 +14,7 @@ import { EdgeText } from '../themed/EdgeText' import { SafeSlider } from '../themed/SafeSlider' import { SceneHeaderUi4 } from '../themed/SceneHeaderUi4' -interface Props extends EdgeSceneProps<'confirmScene'> {} +interface Props extends EdgeAppSceneProps<'confirmScene'> {} export interface ConfirmSceneParams { titleText: string diff --git a/src/components/scenes/CreateWalletAccountSelectScene.tsx b/src/components/scenes/CreateWalletAccountSelectScene.tsx index 9636e2c6ce2..b87aa651291 100644 --- a/src/components/scenes/CreateWalletAccountSelectScene.tsx +++ b/src/components/scenes/CreateWalletAccountSelectScene.tsx @@ -12,7 +12,7 @@ import { lstrings } from '../../locales/strings' import { getExchangeDenomByCurrencyCode } from '../../selectors/DenominationSelectors' import { config } from '../../theme/appConfig' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { EdgeAsset } from '../../types/types' import { getCurrencyCode, getWalletTokenId } from '../../util/CurrencyInfoHelpers' import { getWalletName } from '../../util/CurrencyWalletHelpers' @@ -53,7 +53,7 @@ export interface AccountActivationPaymentInfo { expireTime: number } -interface Props extends EdgeSceneProps<'createWalletAccountSelect'> { +interface Props extends EdgeAppSceneProps<'createWalletAccountSelect'> { wallet: EdgeCurrencyWallet } @@ -108,7 +108,7 @@ export const CreateWalletAccountSelectScene = withWallet((props: Props) => { const handleSelect = useHandler(() => { Airship.show(bridge => ( - + )) .then(async result => { if (result?.type === 'wallet') { @@ -139,7 +139,9 @@ export const CreateWalletAccountSelectScene = withWallet((props: Props) => { const handleSubmit = useHandler(async () => { const createdWalletInstance = await handleRenameAndReturnWallet() - dispatch(createAccountTransaction(props.navigation, createdWalletInstance.id, accountName, walletId, activationPaymentInfo)).catch(err => showError(err)) + dispatch(createAccountTransaction(props.navigation as NavigationBase, createdWalletInstance.id, accountName, walletId, activationPaymentInfo)).catch(err => + showError(err) + ) }) const handleCancel = useHandler(() => setWalletId('')) diff --git a/src/components/scenes/CreateWalletAccountSetupScene.tsx b/src/components/scenes/CreateWalletAccountSetupScene.tsx index c6710746dda..697b427c78e 100644 --- a/src/components/scenes/CreateWalletAccountSetupScene.tsx +++ b/src/components/scenes/CreateWalletAccountSetupScene.tsx @@ -7,7 +7,7 @@ import { useHandler } from '../../hooks/useHandler' import { useMount } from '../../hooks/useMount' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' import { withWallet } from '../hoc/withWallet' @@ -22,7 +22,7 @@ export interface CreateWalletAccountSetupParams { walletId: string } -interface Props extends EdgeSceneProps<'createWalletAccountSetup'> { +interface Props extends EdgeAppSceneProps<'createWalletAccountSetup'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/CreateWalletCompletionScene.tsx b/src/components/scenes/CreateWalletCompletionScene.tsx index 93a88c7b9a8..0e0a31e5f20 100644 --- a/src/components/scenes/CreateWalletCompletionScene.tsx +++ b/src/components/scenes/CreateWalletCompletionScene.tsx @@ -12,7 +12,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { splitCreateWalletItems, WalletCreateItem } from '../../selectors/getCreateWalletList' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneButtons } from '../buttons/SceneButtons' import { SceneWrapper } from '../common/SceneWrapper' import { IconDataRow } from '../rows/IconDataRow' @@ -30,7 +30,7 @@ export interface CreateWalletCompletionParams { keyOptions?: Map } -interface Props extends EdgeSceneProps<'createWalletCompletion'> {} +interface Props extends EdgeAppSceneProps<'createWalletCompletion'> {} const CreateWalletCompletionComponent = (props: Props) => { const { navigation, route } = props @@ -161,7 +161,7 @@ const CreateWalletCompletionComponent = (props: Props) => { return null }) - const handleNext = useHandler(() => navigation.navigate('walletsTab', { screen: 'walletList' })) + const handleNext = useHandler(() => navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } })) const handleMigrate = useHandler(() => { // Transform filtered items into the structure expected by the migration component diff --git a/src/components/scenes/CreateWalletEditNameScene.tsx b/src/components/scenes/CreateWalletEditNameScene.tsx index c6162924957..e3019523841 100644 --- a/src/components/scenes/CreateWalletEditNameScene.tsx +++ b/src/components/scenes/CreateWalletEditNameScene.tsx @@ -12,7 +12,7 @@ import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' import { splitCreateWalletItems, WalletCreateItem } from '../../selectors/getCreateWalletList' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { logEvent } from '../../util/tracking' import { ButtonsView } from '../buttons/ButtonsView' @@ -30,7 +30,7 @@ export interface CreateWalletEditNameParams { splitSourceWalletId?: string } -interface Props extends EdgeSceneProps<'createWalletEditName'> {} +interface Props extends EdgeAppSceneProps<'createWalletEditName'> {} const CreateWalletEditNameComponent = (props: Props) => { const { navigation, route } = props @@ -85,7 +85,7 @@ const CreateWalletEditNameComponent = (props: Props) => { showError(error) dispatch(logEvent('Create_Wallet_Failed', { error: String(error) })) } - navigation.navigate('walletsTab', { screen: 'walletList' }) + navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } }) return } // Any other combination goes to the completion scene @@ -104,7 +104,7 @@ const CreateWalletEditNameComponent = (props: Props) => { break } } - navigation.navigate('walletsTab', { screen: 'walletList' }) + navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } }) } }) @@ -161,7 +161,7 @@ const CreateWalletEditNameComponent = (props: Props) => { // If all remaining create items are tokens just go enable them and return home if (newWalletItemsCopy.length === 0 && newTokenItems.length > 0) { await dispatch(enableTokensAcrossWallets(newTokenItems)) - navigation.navigate('walletsTab', { screen: 'walletList' }) + navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } }) return } diff --git a/src/components/scenes/CreateWalletImportOptionsScene.tsx b/src/components/scenes/CreateWalletImportOptionsScene.tsx index 5befa45e9dc..e97a5955d65 100644 --- a/src/components/scenes/CreateWalletImportOptionsScene.tsx +++ b/src/components/scenes/CreateWalletImportOptionsScene.tsx @@ -9,7 +9,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { WalletCreateItem } from '../../selectors/getCreateWalletList' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { FlatListItem } from '../../types/types' import { EdgeTouchableOpacity } from '../common/EdgeTouchableOpacity' import { SceneWrapper } from '../common/SceneWrapper' @@ -28,7 +28,7 @@ export interface CreateWalletImportOptionsParams { importText: string } -interface Props extends EdgeSceneProps<'createWalletImportOptions'> {} +interface Props extends EdgeAppSceneProps<'createWalletImportOptions'> {} const CreateWalletImportOptionsComponent = (props: Props) => { const { navigation, route } = props diff --git a/src/components/scenes/CreateWalletImportScene.tsx b/src/components/scenes/CreateWalletImportScene.tsx index 6b866deb595..6c93185a51e 100644 --- a/src/components/scenes/CreateWalletImportScene.tsx +++ b/src/components/scenes/CreateWalletImportScene.tsx @@ -11,7 +11,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { splitCreateWalletItems, WalletCreateItem } from '../../selectors/getCreateWalletList' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneButtons } from '../buttons/SceneButtons' import { SceneWrapper } from '../common/SceneWrapper' import { ButtonsModal } from '../modals/ButtonsModal' @@ -26,7 +26,7 @@ export interface CreateWalletImportParams { walletNames: { [key: string]: string } } -interface Props extends EdgeSceneProps<'createWalletImport'> {} +interface Props extends EdgeAppSceneProps<'createWalletImport'> {} const CreateWalletImportComponent = (props: Props) => { const { navigation, route } = props diff --git a/src/components/scenes/CreateWalletSelectCryptoScene.tsx b/src/components/scenes/CreateWalletSelectCryptoScene.tsx index 78df018b0ef..692557fd7d9 100644 --- a/src/components/scenes/CreateWalletSelectCryptoScene.tsx +++ b/src/components/scenes/CreateWalletSelectCryptoScene.tsx @@ -17,7 +17,7 @@ import { WalletCreateItem } from '../../selectors/getCreateWalletList' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps, NavigationProp } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { EdgeAsset } from '../../types/types' import { logEvent } from '../../util/tracking' import { EdgeButton } from '../buttons/EdgeButton' @@ -36,14 +36,17 @@ import { SimpleTextInput } from '../themed/SimpleTextInput' import { WalletListCurrencyRow } from '../themed/WalletListCurrencyRow' export interface CreateWalletSelectCryptoParams { - newAccountFlow?: (navigation: NavigationProp<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'>, items: WalletCreateItem[]) => Promise + newAccountFlow?: ( + navigation: EdgeAppSceneProps<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'>['navigation'], + items: WalletCreateItem[] + ) => Promise defaultSelection?: EdgeAsset[] disableLegacy?: boolean splitPluginIds?: string[] splitSourceWalletId?: string } -interface Props extends EdgeSceneProps<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'> {} +interface Props extends EdgeAppSceneProps<'createWalletSelectCrypto' | 'createWalletSelectCryptoNewAccount'> {} const CreateWalletSelectCryptoComponent = (props: Props) => { const { navigation, route } = props @@ -221,7 +224,7 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { } else { // Otherwise enable the tokens and return to the main scene. await dispatch(enableTokensAcrossWallets(newTokenItems)) - navigation.navigate('walletsTab', { screen: 'walletList' }) + navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } }) } }) @@ -236,7 +239,7 @@ const CreateWalletSelectCryptoComponent = (props: Props) => { const walletListResult = await Airship.show(bridge => ( {} +interface Props extends EdgeAppSceneProps<'currencyNotificationSettings'> {} export const CurrencyNotificationScene = (props: Props) => { const { route } = props diff --git a/src/components/scenes/CurrencySettingsScene.tsx b/src/components/scenes/CurrencySettingsScene.tsx index a04c5c548b2..bc709ef44f6 100644 --- a/src/components/scenes/CurrencySettingsScene.tsx +++ b/src/components/scenes/CurrencySettingsScene.tsx @@ -6,7 +6,7 @@ import { setDenominationKeyRequest } from '../../actions/SettingsActions' import { useDisplayDenom } from '../../hooks/useDisplayDenom' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' import { cacheStyles, Theme, useTheme } from '../services/ThemeContext' import { SettingsHeaderRow } from '../settings/SettingsHeaderRow' @@ -18,7 +18,7 @@ export interface CurrencySettingsParams { currencyInfo: EdgeCurrencyInfo } -interface Props extends EdgeSceneProps<'currencySettings'> {} +interface Props extends EdgeAppSceneProps<'currencySettings'> {} export function CurrencySettingsScene(props: Props) { const { route } = props diff --git a/src/components/scenes/DefaultFiatSettingScene.tsx b/src/components/scenes/DefaultFiatSettingScene.tsx index 1ea0420957d..d24f54c6f8d 100644 --- a/src/components/scenes/DefaultFiatSettingScene.tsx +++ b/src/components/scenes/DefaultFiatSettingScene.tsx @@ -10,7 +10,7 @@ import { FIAT_COUNTRY } from '../../constants/CountryConstants' import { lstrings } from '../../locales/strings' import { getDefaultFiat } from '../../selectors/SettingsSelectors' import { connect } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { Theme } from '../../types/Theme' import { FlatListItem, GuiFiatType } from '../../types/types' import { getSupportedFiats } from '../../util/utils' @@ -22,7 +22,7 @@ import { SceneHeader } from '../themed/SceneHeader' import { SelectableRow } from '../themed/SelectableRow' import { SimpleTextInput } from '../themed/SimpleTextInput' -interface OwnProps extends EdgeSceneProps<'defaultFiatSetting'> {} +interface OwnProps extends EdgeAppSceneProps<'defaultFiatSetting'> {} interface StateProps { supportedFiats: GuiFiatType[] diff --git a/src/components/scenes/EdgeLoginScene.tsx b/src/components/scenes/EdgeLoginScene.tsx index f812c568650..a35f8a20511 100644 --- a/src/components/scenes/EdgeLoginScene.tsx +++ b/src/components/scenes/EdgeLoginScene.tsx @@ -8,7 +8,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { config } from '../../theme/appConfig' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { WarningCard } from '../cards/WarningCard' import { CrossFade } from '../common/CrossFade' import { SceneWrapper } from '../common/SceneWrapper' @@ -23,7 +23,7 @@ export interface EdgeLoginParams { lobbyId: string } -interface Props extends EdgeSceneProps<'edgeLogin'> {} +interface Props extends EdgeAppSceneProps<'edgeLogin'> {} export const EdgeLoginScene = (props: Props) => { const { navigation, route } = props diff --git a/src/components/scenes/EditTokenScene.tsx b/src/components/scenes/EditTokenScene.tsx index f56634259a2..8aad8978da3 100644 --- a/src/components/scenes/EditTokenScene.tsx +++ b/src/components/scenes/EditTokenScene.tsx @@ -8,7 +8,7 @@ import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { config } from '../../theme/appConfig' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { logActivity } from '../../util/logger' import { ButtonsView } from '../buttons/ButtonsView' @@ -33,7 +33,7 @@ export interface EditTokenParams { walletId: string } -interface Props extends EdgeSceneProps<'editToken'> { +interface Props extends EdgeAppSceneProps<'editToken'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/ExtraTabScene.tsx b/src/components/scenes/ExtraTabScene.tsx index 2ce14bbfd18..27704814d6c 100644 --- a/src/components/scenes/ExtraTabScene.tsx +++ b/src/components/scenes/ExtraTabScene.tsx @@ -4,11 +4,11 @@ import WebView from 'react-native-webview' import { lstrings } from '../../locales/strings' import { config } from '../../theme/appConfig' import { GuiPlugin } from '../../types/GuiPluginTypes' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' import { EdgeProviderComponent } from '../themed/EdgeProviderComponent' -interface Props extends EdgeSceneProps<'extraTab'> {} +interface Props extends EdgeAppSceneProps<'extraTab'> {} export function ExtraTabScene(props: Props) { if (config.extraTab == null) throw new Error('No extra tab config info') @@ -25,7 +25,7 @@ export function ExtraTabScene(props: Props) { return ( - + ) } diff --git a/src/components/scenes/Fio/FioAddressDetailsScene.tsx b/src/components/scenes/Fio/FioAddressDetailsScene.tsx index 95fd2c3340c..ebd377349b1 100644 --- a/src/components/scenes/Fio/FioAddressDetailsScene.tsx +++ b/src/components/scenes/Fio/FioAddressDetailsScene.tsx @@ -5,7 +5,7 @@ import IonIcon from 'react-native-vector-icons/Ionicons' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { BUNDLED_TXS_AMOUNT_ALERT, findWalletByFioAddress } from '../../../util/FioAddressUtils' import { AlertCardUi4 } from '../../cards/AlertCard' import { EdgeCard } from '../../cards/EdgeCard' @@ -28,7 +28,7 @@ interface StateProps { fioWallets: EdgeCurrencyWallet[] } -interface OwnProps extends EdgeSceneProps<'fioAddressDetails'> {} +interface OwnProps extends EdgeAppSceneProps<'fioAddressDetails'> {} interface LocalState { fioWalletLoading: boolean @@ -122,7 +122,12 @@ export class FioAddressDetails extends React.Component { icon={} label={lstrings.fio_address_details_connect_to_wallets} /> - + ) diff --git a/src/components/scenes/Fio/FioAddressListScene.tsx b/src/components/scenes/Fio/FioAddressListScene.tsx index 56aea86f687..07de9ddece9 100644 --- a/src/components/scenes/Fio/FioAddressListScene.tsx +++ b/src/components/scenes/Fio/FioAddressListScene.tsx @@ -9,7 +9,7 @@ import fioAddressLogo from '../../../assets/images/fio/fio_logo.png' import { SCROLL_INDICATOR_INSET_FIX } from '../../../constants/constantSettings' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { FioAddress, FioDomain } from '../../../types/types' import { ButtonsView } from '../../buttons/ButtonsView' import { EdgeAnim, fadeIn, fadeOut } from '../../common/EdgeAnim' @@ -38,7 +38,7 @@ interface DispatchProps { refreshAllFioAddresses: () => Promise } -interface OwnProps extends EdgeSceneProps<'fioAddressList'> {} +interface OwnProps extends EdgeAppSceneProps<'fioAddressList'> {} type Props = StateProps & DispatchProps & OwnProps & ThemeProps diff --git a/src/components/scenes/Fio/FioAddressRegisterScene.tsx b/src/components/scenes/Fio/FioAddressRegisterScene.tsx index a6d413b4b0c..41223aa1b52 100644 --- a/src/components/scenes/Fio/FioAddressRegisterScene.tsx +++ b/src/components/scenes/Fio/FioAddressRegisterScene.tsx @@ -7,7 +7,7 @@ import { createFioWallet } from '../../../actions/FioAddressActions' import { FIO_ADDRESS_DELIMITER, FIO_DOMAIN_DEFAULT } from '../../../constants/WalletAndCurrencyConstants' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { FioDomain, FioPublicDomain } from '../../../types/types' import { getWalletName } from '../../../util/CurrencyWalletHelpers' import { checkIsDomainPublic } from '../../../util/FioAddressUtils' @@ -42,7 +42,7 @@ interface State { errorMessage: string } -interface OwnProps extends EdgeSceneProps<'fioAddressRegister'> {} +interface OwnProps extends EdgeAppSceneProps<'fioAddressRegister'> {} interface StateProps { fioWallets: EdgeCurrencyWallet[] @@ -289,7 +289,7 @@ export class FioAddressRegister extends React.Component { await Airship.show(bridge => ( @@ -306,7 +306,7 @@ export class FioAddressRegister extends React.Component { const { domainsLoading } = this.state if (domainsLoading) return const response = await Airship.show(bridge => ( - + )) if (response) { this.setState({ selectedDomain: response }) diff --git a/src/components/scenes/Fio/FioAddressRegisterSelectWalletScene.tsx b/src/components/scenes/Fio/FioAddressRegisterSelectWalletScene.tsx index 11d9788e85a..d855b9c5b5f 100644 --- a/src/components/scenes/Fio/FioAddressRegisterSelectWalletScene.tsx +++ b/src/components/scenes/Fio/FioAddressRegisterSelectWalletScene.tsx @@ -9,7 +9,7 @@ import { lstrings } from '../../../locales/strings' import { selectDisplayDenom } from '../../../selectors/DenominationSelectors' import { config } from '../../../theme/appConfig' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { EdgeAsset, FioDomain } from '../../../types/types' import { CryptoAmount } from '../../../util/CryptoAmount' import { getCurrencyCode } from '../../../util/CurrencyInfoHelpers' @@ -42,7 +42,7 @@ interface StateProps { isConnected: boolean } -interface OwnProps extends EdgeSceneProps<'fioAddressRegisterSelectWallet'> { +interface OwnProps extends EdgeAppSceneProps<'fioAddressRegisterSelectWallet'> { wallet: EdgeCurrencyWallet } @@ -132,7 +132,12 @@ export class FioAddressRegisterSelectWallet extends React.Component(bridge => ( - + )) if (result?.type === 'wallet') { const { walletId, tokenId } = result @@ -170,7 +175,7 @@ export class FioAddressRegisterSelectWallet extends React.Component {} +interface OwnProps extends EdgeAppSceneProps<'fioAddressRegisterSuccess'> {} type Props = OwnProps & ThemeProps diff --git a/src/components/scenes/Fio/FioAddressSettingsScene.tsx b/src/components/scenes/Fio/FioAddressSettingsScene.tsx index 032a6d531e3..4c83c50c936 100644 --- a/src/components/scenes/Fio/FioAddressSettingsScene.tsx +++ b/src/components/scenes/Fio/FioAddressSettingsScene.tsx @@ -5,7 +5,7 @@ import { View } from 'react-native' import { refreshAllFioAddresses } from '../../../actions/FioAddressActions' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { CryptoAmount } from '../../../util/CryptoAmount' import { addBundledTxs, getAddBundledTxsFee, getTransferFee } from '../../../util/FioAddressUtils' import { logEvent, TrackingEventName, TrackingValues } from '../../../util/tracking' @@ -44,7 +44,7 @@ interface DispatchProps { onLogEvent: (event: TrackingEventName, values: TrackingValues) => void } -interface OwnProps extends EdgeSceneProps<'fioAddressSettings'> { +interface OwnProps extends EdgeAppSceneProps<'fioAddressSettings'> { wallet: EdgeCurrencyWallet } @@ -192,7 +192,7 @@ export class FioAddressSettingsComponent extends React.Component )} {showTransfer && ( @@ -201,7 +201,7 @@ export class FioAddressSettingsComponent extends React.Component )} {!showAddBundledTxs && !showTransfer && ( diff --git a/src/components/scenes/Fio/FioConnectWalletConfirmScene.tsx b/src/components/scenes/Fio/FioConnectWalletConfirmScene.tsx index 4231eaeebe0..1057e02536b 100644 --- a/src/components/scenes/Fio/FioConnectWalletConfirmScene.tsx +++ b/src/components/scenes/Fio/FioConnectWalletConfirmScene.tsx @@ -5,7 +5,7 @@ import { View } from 'react-native' import { lstrings } from '../../../locales/strings' import { CcWalletMap } from '../../../reducers/FioReducer' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { FioConnectionWalletItem } from '../../../types/types' import { FIO_NO_BUNDLED_ERR_CODE, updatePubAddressesForFioAddress } from '../../../util/FioAddressUtils' import { EdgeCard } from '../../cards/EdgeCard' @@ -38,7 +38,7 @@ interface StateProps { isConnected: boolean } -interface OwnProps extends EdgeSceneProps<'fioConnectToWalletsConfirm'> { +interface OwnProps extends EdgeAppSceneProps<'fioConnectToWalletsConfirm'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/Fio/FioCreateHandleScene.tsx b/src/components/scenes/Fio/FioCreateHandleScene.tsx index a4cbe5e0bdb..58d417571ba 100644 --- a/src/components/scenes/Fio/FioCreateHandleScene.tsx +++ b/src/components/scenes/Fio/FioCreateHandleScene.tsx @@ -14,7 +14,7 @@ import { useAsyncEffect } from '../../../hooks/useAsyncEffect' import { useHandler } from '../../../hooks/useHandler' import { lstrings } from '../../../locales/strings' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getFioCustomizeHandleImage } from '../../../util/CdnUris' import { logEvent } from '../../../util/tracking' import { SceneWrapper } from '../../common/SceneWrapper' @@ -29,7 +29,7 @@ export interface FioCreateHandleParams { freeRegRefCode: string } -interface Props extends EdgeSceneProps<'fioCreateHandle'> {} +interface Props extends EdgeAppSceneProps<'fioCreateHandle'> {} const asRegisterSuccessRes = asObject({ account_id: asNumber, diff --git a/src/components/scenes/Fio/FioDomainRegisterScene.tsx b/src/components/scenes/Fio/FioDomainRegisterScene.tsx index cefc289cb22..6b42acdcc80 100644 --- a/src/components/scenes/Fio/FioDomainRegisterScene.tsx +++ b/src/components/scenes/Fio/FioDomainRegisterScene.tsx @@ -6,7 +6,7 @@ import IonIcon from 'react-native-vector-icons/Ionicons' import { createFioWallet } from '../../../actions/FioAddressActions' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { getWalletName } from '../../../util/CurrencyWalletHelpers' import { AlertCardUi4 } from '../../cards/AlertCard' import { EdgeCard } from '../../cards/EdgeCard' @@ -31,7 +31,7 @@ interface LocalState { errorMessage: string } -interface OwnProps extends EdgeSceneProps<'fioDomainRegister'> {} +interface OwnProps extends EdgeAppSceneProps<'fioDomainRegister'> {} interface StateProps { fioWallets: EdgeCurrencyWallet[] @@ -174,7 +174,7 @@ export class FioDomainRegister extends React.PureComponent { const result = await Airship.show(bridge => ( diff --git a/src/components/scenes/Fio/FioDomainRegisterSelectWalletScene.tsx b/src/components/scenes/Fio/FioDomainRegisterSelectWalletScene.tsx index 0182a9db966..7149c027004 100644 --- a/src/components/scenes/Fio/FioDomainRegisterSelectWalletScene.tsx +++ b/src/components/scenes/Fio/FioDomainRegisterSelectWalletScene.tsx @@ -10,7 +10,7 @@ import { lstrings } from '../../../locales/strings' import { selectDisplayDenomByCurrencyCode } from '../../../selectors/DenominationSelectors' import { config } from '../../../theme/appConfig' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { EdgeAsset } from '../../../types/types' import { CryptoAmount } from '../../../util/CryptoAmount' import { getCurrencyCode } from '../../../util/CurrencyInfoHelpers' @@ -42,7 +42,7 @@ interface StateProps { isConnected: boolean } -interface OwnProps extends EdgeSceneProps<'fioDomainRegisterSelectWallet'> { +interface OwnProps extends EdgeAppSceneProps<'fioDomainRegisterSelectWallet'> { wallet: EdgeCurrencyWallet } @@ -117,7 +117,7 @@ class FioDomainRegisterSelectWallet extends React.PureComponent(bridge => ( @@ -162,7 +162,7 @@ class FioDomainRegisterSelectWallet extends React.PureComponent Promise onLogEvent: (event: TrackingEventName, values: TrackingValues) => void } -interface OwnProps extends EdgeSceneProps<'fioDomainSettings'> { +interface OwnProps extends EdgeAppSceneProps<'fioDomainSettings'> { wallet: EdgeCurrencyWallet } @@ -204,7 +204,7 @@ export class FioDomainSettingsComponent extends React.Component { successMessage={isPublic ? lstrings.fio_domain_is_private_label : lstrings.fio_domain_is_public_label} fioWallet={fioWallet} showPaymentWalletPicker - navigation={this.props.navigation} + navigation={this.props.navigation as NavigationBase} /> )} {showRenew && ( @@ -216,11 +216,16 @@ export class FioDomainSettingsComponent extends React.Component { successMessage={lstrings.fio_request_renew_domain_ok_text} fioWallet={fioWallet} showPaymentWalletPicker - navigation={this.props.navigation} + navigation={this.props.navigation as NavigationBase} /> )} {showTransfer && ( - + )} {!showRenew && !showVisibility && !showTransfer && ( diff --git a/src/components/scenes/Fio/FioNameConfirmScene.tsx b/src/components/scenes/Fio/FioNameConfirmScene.tsx index e4223543ea5..ac44681ed32 100644 --- a/src/components/scenes/Fio/FioNameConfirmScene.tsx +++ b/src/components/scenes/Fio/FioNameConfirmScene.tsx @@ -5,7 +5,7 @@ import { View } from 'react-native' import { FIO_ADDRESS_DELIMITER } from '../../../constants/WalletAndCurrencyConstants' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { CryptoAmount } from '../../../util/CryptoAmount' import { fioMakeSpend, fioSignAndBroadcast } from '../../../util/FioAddressUtils' import { logEvent, TrackingEventName, TrackingValues } from '../../../util/tracking' @@ -31,7 +31,7 @@ interface StateProps { isConnected: boolean } -interface OwnProps extends EdgeSceneProps<'fioDomainConfirm' | 'fioNameConfirm'> { +interface OwnProps extends EdgeAppSceneProps<'fioDomainConfirm' | 'fioNameConfirm'> { wallet: EdgeCurrencyWallet } @@ -115,7 +115,7 @@ class FioNameConfirm extends React.PureComponent { buttons={{ ok: { label: lstrings.string_ok_cap } }} /> )) - navigation.navigate('home') + navigation.navigate('edgeTabs', { screen: 'home' }) } else { // no free domains showError(lstrings.fio_get_fee_err_msg) @@ -194,7 +194,7 @@ class FioNameConfirm extends React.PureComponent { onSubmit={this.saveFioName} getOperationFee={this.getFee} fioWallet={paymentWallet} - navigation={this.props.navigation} + navigation={this.props.navigation as NavigationBase} onCancel={() => navigation.goBack()} /> diff --git a/src/components/scenes/Fio/FioRequestConfirmationScene.tsx b/src/components/scenes/Fio/FioRequestConfirmationScene.tsx index c4e9eedc21d..59c82497d9d 100644 --- a/src/components/scenes/Fio/FioRequestConfirmationScene.tsx +++ b/src/components/scenes/Fio/FioRequestConfirmationScene.tsx @@ -9,7 +9,7 @@ import { CcWalletMap } from '../../../reducers/FioReducer' import { getExchangeDenom, selectDisplayDenom } from '../../../selectors/DenominationSelectors' import { getExchangeRate } from '../../../selectors/WalletSelectors' import { useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getCurrencyCode } from '../../../util/CurrencyInfoHelpers' import { addToFioAddressCache, @@ -56,7 +56,7 @@ interface StateProps { defaultIsoFiat: string } -interface OwnProps extends EdgeSceneProps<'fioRequestConfirmation'> { +interface OwnProps extends EdgeAppSceneProps<'fioRequestConfirmation'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/Fio/FioRequestListScene.tsx b/src/components/scenes/Fio/FioRequestListScene.tsx index 2bc4b211ebf..0b7384899e0 100644 --- a/src/components/scenes/Fio/FioRequestListScene.tsx +++ b/src/components/scenes/Fio/FioRequestListScene.tsx @@ -10,7 +10,7 @@ import { formatDate, SHORT_DATE_FMT } from '../../../locales/intl' import { lstrings } from '../../../locales/strings' import { getExchangeDenomByCurrencyCode } from '../../../selectors/DenominationSelectors' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { FioAddress, FioRequest } from '../../../types/types' import { getCurrencyCode, getTokenIdForced } from '../../../util/CurrencyInfoHelpers' import { @@ -63,7 +63,7 @@ interface DispatchProps { refreshAllFioAddresses: () => Promise } -interface OwnProps extends EdgeSceneProps<'fioRequestList'> {} +interface OwnProps extends EdgeAppSceneProps<'fioRequestList'> {} type Props = OwnProps & StateProps & ThemeProps & DispatchProps @@ -376,7 +376,12 @@ class FioRequestList extends React.Component { const allowedAssets = [{ pluginId, tokenId }] const result = await Airship.show(bridge => ( - + )) if (result?.type === 'wallet') { const { walletId, tokenId } = result diff --git a/src/components/scenes/Fio/FioSentRequestDetailsScene.tsx b/src/components/scenes/Fio/FioSentRequestDetailsScene.tsx index ec2483610b1..565d379006e 100644 --- a/src/components/scenes/Fio/FioSentRequestDetailsScene.tsx +++ b/src/components/scenes/Fio/FioSentRequestDetailsScene.tsx @@ -6,7 +6,7 @@ import { FIAT_CODES_SYMBOLS } from '../../../constants/WalletAndCurrencyConstant import { formatDate, formatNumber, SHORT_DATE_FMT } from '../../../locales/intl' import { lstrings } from '../../../locales/strings' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { FioRequest, FioRequestStatus, GuiExchangeRates } from '../../../types/types' import { EdgeCard } from '../../cards/EdgeCard' import { SceneWrapper } from '../../common/SceneWrapper' @@ -19,7 +19,7 @@ export interface FioSentRequestDetailsParams { selectedFioSentRequest: FioRequest } -interface OwnProps extends EdgeSceneProps<'fioSentRequestDetails'> {} +interface OwnProps extends EdgeAppSceneProps<'fioSentRequestDetails'> {} interface StateProps { fiatSymbol: string diff --git a/src/components/scenes/Fio/FioStakingChangeScene.tsx b/src/components/scenes/Fio/FioStakingChangeScene.tsx index 4e201097ddd..81ab5a5ef78 100644 --- a/src/components/scenes/Fio/FioStakingChangeScene.tsx +++ b/src/components/scenes/Fio/FioStakingChangeScene.tsx @@ -14,7 +14,7 @@ import { formatNumber, formatTimeDate, SHORT_DATE_FMT } from '../../../locales/i import { lstrings } from '../../../locales/strings' import { getExchangeDenom } from '../../../selectors/DenominationSelectors' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getCurrencyCode } from '../../../util/CurrencyInfoHelpers' import { FioStakingBalanceType, getFioStakingBalances } from '../../../util/stakeUtils' import { convertCurrencyFromExchangeRates, convertNativeToDenomination } from '../../../util/utils' @@ -33,7 +33,7 @@ import { ModalTitle } from '../../themed/ModalParts' import { SceneHeader } from '../../themed/SceneHeader' import { Slider } from '../../themed/Slider' -interface Props extends EdgeSceneProps<'fioStakingChange'> { +interface Props extends EdgeAppSceneProps<'fioStakingChange'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/Fio/FioStakingOverviewScene.tsx b/src/components/scenes/Fio/FioStakingOverviewScene.tsx index a61bdda98c0..d05f9868ef0 100644 --- a/src/components/scenes/Fio/FioStakingOverviewScene.tsx +++ b/src/components/scenes/Fio/FioStakingOverviewScene.tsx @@ -14,7 +14,7 @@ import { lstrings } from '../../../locales/strings' import { getExchangeDenomByCurrencyCode, selectDisplayDenomByCurrencyCode } from '../../../selectors/DenominationSelectors' import { convertCurrency } from '../../../selectors/WalletSelectors' import { connect } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getCurrencyCode } from '../../../util/CurrencyInfoHelpers' import { getFioStakingBalances } from '../../../util/stakeUtils' import { convertNativeToDenomination } from '../../../util/utils' @@ -31,7 +31,7 @@ export interface FioStakingOverviewParams { walletId: string } -interface OwnProps extends EdgeSceneProps<'fioStakingOverview'> {} +interface OwnProps extends EdgeAppSceneProps<'fioStakingOverview'> {} interface StateProps { currencyWallet: EdgeCurrencyWallet diff --git a/src/components/scenes/Loans/LoanCloseScene.tsx b/src/components/scenes/Loans/LoanCloseScene.tsx index 1cefbb4c81a..5ddd2bc4daa 100644 --- a/src/components/scenes/Loans/LoanCloseScene.tsx +++ b/src/components/scenes/Loans/LoanCloseScene.tsx @@ -17,7 +17,7 @@ import { useUrlHandler } from '../../../hooks/useUrlHandler' import { useWatch } from '../../../hooks/useWatch' import { lstrings } from '../../../locales/strings' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { makeAaveCloseAction } from '../../../util/ActionProgramUtils' import { getExecutionNetworkFees } from '../../../util/networkFeeUtils' import { filterNull } from '../../../util/safeFilters' @@ -40,7 +40,7 @@ export interface LoanCloseParams { loanAccountId: string } -export interface Props extends EdgeSceneProps<'loanClose'> { +export interface Props extends EdgeAppSceneProps<'loanClose'> { loanAccount: LoanAccount } diff --git a/src/components/scenes/Loans/LoanCreateConfirmationScene.tsx b/src/components/scenes/Loans/LoanCreateConfirmationScene.tsx index 7d310291462..6b6aff6e7ef 100644 --- a/src/components/scenes/Loans/LoanCreateConfirmationScene.tsx +++ b/src/components/scenes/Loans/LoanCreateConfirmationScene.tsx @@ -17,7 +17,7 @@ import { lstrings } from '../../../locales/strings' import { BorrowEngine, BorrowPlugin } from '../../../plugins/borrow-plugins/types' import { convertCurrency } from '../../../selectors/WalletSelectors' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { LoanAsset, makeAaveCreateActionProgram } from '../../../util/ActionProgramUtils' import { getExecutionNetworkFees } from '../../../util/networkFeeUtils' import { translateError } from '../../../util/translateError' @@ -53,7 +53,7 @@ const FEE_VOLATILITY_MULTIPLIER: { [network: string]: string } = { polygon: '1.5' } -interface Props extends EdgeSceneProps<'loanCreateConfirmation'> {} +interface Props extends EdgeAppSceneProps<'loanCreateConfirmation'> {} export const LoanCreateConfirmationScene = (props: Props) => { const dispatch = useDispatch() diff --git a/src/components/scenes/Loans/LoanCreateScene.tsx b/src/components/scenes/Loans/LoanCreateScene.tsx index 23a70a5417b..9326ac1fd67 100644 --- a/src/components/scenes/Loans/LoanCreateScene.tsx +++ b/src/components/scenes/Loans/LoanCreateScene.tsx @@ -25,7 +25,7 @@ import { BorrowEngine, BorrowPlugin } from '../../../plugins/borrow-plugins/type import { convertCurrency } from '../../../selectors/WalletSelectors' import { config } from '../../../theme/appConfig' import { useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { getWalletPickerExcludeWalletIds } from '../../../util/borrowUtils' import { getBorrowPluginIconUri } from '../../../util/CdnUris' import { getCurrencyCode, getTokenId, getTokenIdForced } from '../../../util/CurrencyInfoHelpers' @@ -52,7 +52,7 @@ export interface LoanCreateParams { borrowPlugin: BorrowPlugin } -interface Props extends EdgeSceneProps<'loanCreate'> {} +interface Props extends EdgeAppSceneProps<'loanCreate'> {} export const LoanCreateScene = (props: Props) => { const { navigation, route } = props @@ -265,7 +265,7 @@ export const LoanCreateScene = (props: Props) => { Airship.show((bridge: AirshipBridge) => ( {} +interface Props extends EdgeAppSceneProps<'loanDashboard'> {} // First-element is the default wallet plugin used to create new wallet const SUPPORTED_WALLET_PLUGIN_IDS = ['polygon'] @@ -112,7 +112,7 @@ export const LoanDashboardScene = (props: Props) => { const result = await Airship.show(bridge => ( { +interface Props extends EdgeAppSceneProps<'loanDetails'> { loanAccount: LoanAccount } diff --git a/src/components/scenes/Loans/LoanManageScene.tsx b/src/components/scenes/Loans/LoanManageScene.tsx index 0f4ae03160d..1f988aa8058 100644 --- a/src/components/scenes/Loans/LoanManageScene.tsx +++ b/src/components/scenes/Loans/LoanManageScene.tsx @@ -25,7 +25,7 @@ import { toPercentString } from '../../../locales/intl' import { lstrings } from '../../../locales/strings' import { BorrowCollateral, BorrowDebt } from '../../../plugins/borrow-plugins/types' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../../types/routerTypes' import { LoanAsset, makeAaveBorrowAction, makeAaveDepositAction } from '../../../util/ActionProgramUtils' import { getWalletPickerExcludeWalletIds } from '../../../util/borrowUtils' import { getBorrowPluginIconUri } from '../../../util/CdnUris' @@ -108,7 +108,7 @@ const MANAGE_ACTION_DATA_MAP: { } } -interface Props extends EdgeSceneProps<'loanManage'> { +interface Props extends EdgeAppSceneProps<'loanManage'> { loanAccount: LoanAccount } @@ -361,7 +361,7 @@ export const LoanManageSceneComponent = (props: Props) => { Airship.show((bridge: AirshipBridge) => ( { +interface Props extends EdgeAppSceneProps<'loanStatus'> { loanAccount: LoanAccount } diff --git a/src/components/scenes/ManageTokensScene.tsx b/src/components/scenes/ManageTokensScene.tsx index c892bdff22f..b0894710481 100644 --- a/src/components/scenes/ManageTokensScene.tsx +++ b/src/components/scenes/ManageTokensScene.tsx @@ -9,7 +9,7 @@ import { useRowLayout } from '../../hooks/useRowLayout' import { useWalletName } from '../../hooks/useWalletName' import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { FlatListItem } from '../../types/types' import { normalizeForSearch } from '../../util/utils' import { ButtonsView } from '../buttons/ButtonsView' @@ -41,7 +41,7 @@ interface Section { data: string[] } -interface Props extends EdgeSceneProps<'manageTokens'> { +interface Props extends EdgeAppSceneProps<'manageTokens'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/MigrateWalletCalculateFeeScene.tsx b/src/components/scenes/MigrateWalletCalculateFeeScene.tsx index 24fa3fba9a0..10076a5355e 100644 --- a/src/components/scenes/MigrateWalletCalculateFeeScene.tsx +++ b/src/components/scenes/MigrateWalletCalculateFeeScene.tsx @@ -12,7 +12,7 @@ import { useHandler } from '../../hooks/useHandler' import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { convertTransactionFeeToDisplayFee, truncateDecimals } from '../../util/utils' import { SceneWrapper } from '../common/SceneWrapper' @@ -29,7 +29,7 @@ export interface MigrateWalletCalculateFeeParams { migrateWalletList: MigrateWalletItem[] } -interface Props extends EdgeSceneProps<'migrateWalletCalculateFee'> {} +interface Props extends EdgeAppSceneProps<'migrateWalletCalculateFee'> {} type AssetRowState = string | Error @@ -126,7 +126,9 @@ const MigrateWalletCalculateFeeComponent = (props: Props) => { const handleInsufficientFunds = useHandler(async (wallet, error) => { const { countryCode } = await getFirstOpenInfo() - await Airship.show(bridge => ) + await Airship.show(bridge => ( + + )) }) const handleSlidingComplete = useHandler(() => { diff --git a/src/components/scenes/MigrateWalletCompletionScene.tsx b/src/components/scenes/MigrateWalletCompletionScene.tsx index e4dfb0fa533..7403e25e44d 100644 --- a/src/components/scenes/MigrateWalletCompletionScene.tsx +++ b/src/components/scenes/MigrateWalletCompletionScene.tsx @@ -13,7 +13,7 @@ import { useHandler } from '../../hooks/useHandler' import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { SceneWrapper } from '../common/SceneWrapper' import { showError } from '../services/AirshipInstance' @@ -27,7 +27,7 @@ export interface MigrateWalletCompletionParams { migrateWalletList: MigrateWalletItem[] } -interface Props extends EdgeSceneProps<'migrateWalletCompletion'> {} +interface Props extends EdgeAppSceneProps<'migrateWalletCompletion'> {} interface MigrateWalletTokenItem extends MigrateWalletItem { tokenId: string @@ -239,7 +239,7 @@ const MigrateWalletCompletionComponent = (props: Props) => { label={!done ? undefined : lstrings.string_done_cap} type="secondary" marginRem={[0, 0, 1]} - onPress={() => navigation.navigate('walletsTab', { screen: 'walletList' })} + onPress={() => navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } })} /> ) diff --git a/src/components/scenes/MigrateWalletSelectCryptoScene.tsx b/src/components/scenes/MigrateWalletSelectCryptoScene.tsx index 1c644f02d84..b8340e9ddb0 100644 --- a/src/components/scenes/MigrateWalletSelectCryptoScene.tsx +++ b/src/components/scenes/MigrateWalletSelectCryptoScene.tsx @@ -9,7 +9,7 @@ import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' import { WalletCreateItem } from '../../selectors/getCreateWalletList' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getCurrencyCode, isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { zeroString } from '../../util/utils' @@ -25,7 +25,7 @@ export interface MigrateWalletSelectCryptoParams { preSelectedWalletIds?: string[] } -interface Props extends EdgeSceneProps<'migrateWalletSelectCrypto'> {} +interface Props extends EdgeAppSceneProps<'migrateWalletSelectCrypto'> {} export interface MigrateWalletItem extends WalletCreateItem { createWalletIds: [string] diff --git a/src/components/scenes/NotificationScene.tsx b/src/components/scenes/NotificationScene.tsx index 52f4a3cc3a3..3c568dff2ac 100644 --- a/src/components/scenes/NotificationScene.tsx +++ b/src/components/scenes/NotificationScene.tsx @@ -5,14 +5,14 @@ import { SPECIAL_CURRENCY_INFO } from '../../constants/WalletAndCurrencyConstant import { useWatch } from '../../hooks/useWatch' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' import { CryptoIcon } from '../icons/CryptoIcon' import { showError } from '../services/AirshipInstance' import { SettingsSwitchRow } from '../settings/SettingsSwitchRow' import { SettingsTappableRow } from '../settings/SettingsTappableRow' -interface Props extends EdgeSceneProps<'notificationSettings'> {} +interface Props extends EdgeAppSceneProps<'notificationSettings'> {} type NotificationSettingToggleSetting = keyof NotificationSettings diff --git a/src/components/scenes/OtpRepairScene.tsx b/src/components/scenes/OtpRepairScene.tsx index 1c8e4701aa0..9021be3de09 100644 --- a/src/components/scenes/OtpRepairScene.tsx +++ b/src/components/scenes/OtpRepairScene.tsx @@ -5,7 +5,7 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { config } from '../../theme/appConfig' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' @@ -13,7 +13,7 @@ export interface OtpRepairParams { otpError: OtpError } -interface Props extends EdgeSceneProps<'otpRepair'> {} +interface Props extends EdgeAppSceneProps<'otpRepair'> {} export const OtpRepairScene = (props: Props) => { const { navigation, route } = props diff --git a/src/components/scenes/OtpSettingsScene.tsx b/src/components/scenes/OtpSettingsScene.tsx index 32c25da52a4..fa1d78e33c9 100644 --- a/src/components/scenes/OtpSettingsScene.tsx +++ b/src/components/scenes/OtpSettingsScene.tsx @@ -10,7 +10,7 @@ import { lstrings } from '../../locales/strings' import { B } from '../../styles/common/textStyles' import { config } from '../../theme/appConfig' import { connect } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logActivity } from '../../util/logger' import { EdgeTouchableOpacity } from '../common/EdgeTouchableOpacity' import { SceneWrapper } from '../common/SceneWrapper' @@ -19,7 +19,7 @@ import { Airship, showError, showToast } from '../services/AirshipInstance' import { Theme, ThemeProps, withTheme } from '../services/ThemeContext' import { MainButton } from '../themed/MainButton' -interface OwnProps extends EdgeSceneProps<'otpSetup'> {} +interface OwnProps extends EdgeAppSceneProps<'otpSetup'> {} interface StateProps { account: EdgeAccount diff --git a/src/components/scenes/PasswordRecoveryScene.tsx b/src/components/scenes/PasswordRecoveryScene.tsx index b72b95b5e74..ae2cee314de 100644 --- a/src/components/scenes/PasswordRecoveryScene.tsx +++ b/src/components/scenes/PasswordRecoveryScene.tsx @@ -4,11 +4,11 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { config } from '../../theme/appConfig' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' -interface Props extends EdgeSceneProps<'passwordRecovery'> {} +interface Props extends EdgeAppSceneProps<'passwordRecovery'> {} export const ChangeRecoveryScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/PromotionSettingsScene.tsx b/src/components/scenes/PromotionSettingsScene.tsx index d2d4c14a916..ab3e883f3fc 100644 --- a/src/components/scenes/PromotionSettingsScene.tsx +++ b/src/components/scenes/PromotionSettingsScene.tsx @@ -5,7 +5,7 @@ import { activatePromotion, removePromotion } from '../../actions/AccountReferra import { lstrings } from '../../locales/strings' import { connect } from '../../types/reactRedux' import { AccountReferral, DeviceReferral } from '../../types/ReferralTypes' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' import { TextInputModal } from '../modals/TextInputModal' import { Airship, showError } from '../services/AirshipInstance' @@ -14,7 +14,7 @@ import { SettingsHeaderRow } from '../settings/SettingsHeaderRow' import { SettingsSubHeader } from '../settings/SettingsSubHeader' import { SettingsTappableRow } from '../settings/SettingsTappableRow' -interface OwnProps extends EdgeSceneProps<'promotionSettings'> {} +interface OwnProps extends EdgeAppSceneProps<'promotionSettings'> {} interface StateProps { accountReferral: AccountReferral diff --git a/src/components/scenes/RequestScene.tsx b/src/components/scenes/RequestScene.tsx index a5043d49c13..d61ee0ca2fc 100644 --- a/src/components/scenes/RequestScene.tsx +++ b/src/components/scenes/RequestScene.tsx @@ -18,7 +18,7 @@ import { selectDisplayDenom } from '../../selectors/DenominationSelectors' import { getExchangeRate } from '../../selectors/WalletSelectors' import { config } from '../../theme/appConfig' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { getCurrencyCode, isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers' import { getAvailableBalance, getWalletName } from '../../util/CurrencyWalletHelpers' import { triggerHaptic } from '../../util/haptic' @@ -51,7 +51,7 @@ export interface RequestParams { walletId: string } -interface OwnProps extends EdgeSceneProps<'request'> { +interface OwnProps extends EdgeAppSceneProps<'request'> { wallet: EdgeCurrencyWallet } @@ -260,7 +260,7 @@ export class RequestSceneComponent extends React.Component { const { navigation } = this.props const result = await Airship.show(bridge => ( - + )) if (result?.type === 'wallet') { const { walletId, tokenId } = result @@ -650,7 +650,7 @@ export const RequestScene = withWallet((props: OwnProps) => { wallet={wallet} refreshAllFioAddresses={async () => await dispatch(refreshAllFioAddresses())} onSelectWallet={async (walletId: string, tokenId: EdgeTokenId) => { - await dispatch(selectWalletToken({ navigation, walletId, tokenId })) + await dispatch(selectWalletToken({ navigation: navigation as NavigationBase, walletId, tokenId })) }} toggleAccountBalanceVisibility={() => dispatch(toggleAccountBalanceVisibility())} /> diff --git a/src/components/scenes/SecurityAlertsScene.tsx b/src/components/scenes/SecurityAlertsScene.tsx index 93b70ff033a..35e22c0fde5 100644 --- a/src/components/scenes/SecurityAlertsScene.tsx +++ b/src/components/scenes/SecurityAlertsScene.tsx @@ -3,11 +3,11 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' -interface Props extends EdgeSceneProps<'securityAlerts'> {} +interface Props extends EdgeAppSceneProps<'securityAlerts'> {} export const SecurityAlertsScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/SendScene2.tsx b/src/components/scenes/SendScene2.tsx index 229b37ecdb4..209e62618a9 100644 --- a/src/components/scenes/SendScene2.tsx +++ b/src/components/scenes/SendScene2.tsx @@ -34,7 +34,7 @@ import { getExchangeDenom } from '../../selectors/DenominationSelectors' import { config } from '../../theme/appConfig' import { useState } from '../../types/reactHooks' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { FioRequest, GuiExchangeRates } from '../../types/types' import { getCurrencyCode } from '../../util/CurrencyInfoHelpers' import { getWalletName } from '../../util/CurrencyWalletHelpers' @@ -68,7 +68,7 @@ import { ErrorTile } from '../tiles/ErrorTile' // TODO: Check contentPadding -interface Props extends EdgeSceneProps<'send2'> {} +interface Props extends EdgeAppSceneProps<'send2'> {} export interface SendScene2Params { walletId: string @@ -218,7 +218,7 @@ const SendComponent = (props: Props) => { async function showInsufficientFeesModal(error: InsufficientFundsError): Promise { const { countryCode } = await getFirstOpenInfo() await Airship.show(bridge => ( - + )) } @@ -307,7 +307,7 @@ const SendComponent = (props: Props) => { lockInputs={lockTilesMap.address} isCameraOpen={doOpenCamera} fioToAddress={fioAddress} - navigation={navigation} + navigation={navigation as NavigationBase} /> ) } @@ -414,7 +414,9 @@ const SendComponent = (props: Props) => { } const handleWalletPress = useHandler(() => { - Airship.show(bridge => ) + Airship.show(bridge => ( + + )) .then(result => { if (result?.type !== 'wallet') { return @@ -585,7 +587,7 @@ const SendComponent = (props: Props) => { return ( { // Mount/Unmount life-cycle events: useMount(() => { if (doCheckAndShowGetCryptoModal) { - dispatch(checkAndShowGetCryptoModal(navigation, coreWallet, tokenId)).catch(err => showError(err)) + dispatch(checkAndShowGetCryptoModal(navigation as NavigationBase, coreWallet, tokenId)).catch(err => showError(err)) } }) useUnmount(() => { diff --git a/src/components/scenes/SettingsScene.tsx b/src/components/scenes/SettingsScene.tsx index 7fcc02398cd..5a8e0fa7c70 100644 --- a/src/components/scenes/SettingsScene.tsx +++ b/src/components/scenes/SettingsScene.tsx @@ -29,7 +29,7 @@ import { getDefaultFiat } from '../../selectors/SettingsSelectors' import { config } from '../../theme/appConfig' import { useState } from '../../types/reactHooks' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { secondsToDisplay } from '../../util/displayTime' import { getDisplayUsername, removeIsoPrefix } from '../../util/utils' import { ButtonsView } from '../buttons/ButtonsView' @@ -48,7 +48,7 @@ import { SettingsLabelRow } from '../settings/SettingsLabelRow' import { SettingsSwitchRow } from '../settings/SettingsSwitchRow' import { SettingsTappableRow } from '../settings/SettingsTappableRow' -interface Props extends EdgeSceneProps<'settingsOverview'> {} +interface Props extends EdgeAppSceneProps<'settingsOverview'> {} export const SettingsScene = (props: Props) => { const { navigation } = props @@ -94,7 +94,7 @@ export const SettingsScene = (props: Props) => { const autoLogoutRightText = autoLogout.value === 0 ? lstrings.string_disable : `${autoLogout.value} ${timeStrings[autoLogout.measurement]}` const handleUpgrade = useHandler(() => { - showBackupModal({ navigation }) + showBackupModal({ navigation: navigation as NavigationBase }) }) const handleUnlock = useHandler(() => { @@ -207,7 +207,7 @@ export const SettingsScene = (props: Props) => { onSubmit={async text => { if (text !== username) return lstrings.delete_account_verification_error await account.deleteRemoteAccount() - await dispatch(logoutRequest(navigation)) + await dispatch(logoutRequest(navigation as NavigationBase)) await context.forgetAccount(rootLoginId) Airship.show(bridge => ).catch(err => showDevError(err)) return true diff --git a/src/components/scenes/SpendingLimitsScene.tsx b/src/components/scenes/SpendingLimitsScene.tsx index 565b24368b5..1266c34cfda 100644 --- a/src/components/scenes/SpendingLimitsScene.tsx +++ b/src/components/scenes/SpendingLimitsScene.tsx @@ -8,7 +8,7 @@ import { getFiatSymbol } from '../../constants/WalletAndCurrencyConstants' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { zeroString } from '../../util/utils' import { SceneWrapper } from '../common/SceneWrapper' import { showError, showToast } from '../services/AirshipInstance' @@ -18,7 +18,7 @@ import { EdgeText } from '../themed/EdgeText' import { FilledTextInput } from '../themed/FilledTextInput' import { MainButton } from '../themed/MainButton' -interface Props extends EdgeSceneProps<'spendingLimits'> {} +interface Props extends EdgeAppSceneProps<'spendingLimits'> {} export const SpendingLimitsScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/Staking/EarnScene.tsx b/src/components/scenes/Staking/EarnScene.tsx index 69f655c96e0..83b6c121d43 100644 --- a/src/components/scenes/Staking/EarnScene.tsx +++ b/src/components/scenes/Staking/EarnScene.tsx @@ -11,7 +11,7 @@ import { lstrings } from '../../../locales/strings' import { getStakePlugins } from '../../../plugins/stake-plugins/stakePlugins' import { StakePlugin, StakePolicy, StakePosition } from '../../../plugins/stake-plugins/types' import { useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getPluginFromPolicy, getPositionAllocations } from '../../../util/stakeUtils' import { zeroString } from '../../../util/utils' import { EdgeSwitch } from '../../buttons/EdgeSwitch' @@ -22,7 +22,7 @@ import { SectionHeader } from '../../common/SectionHeader' import { showDevError } from '../../services/AirshipInstance' import { cacheStyles, Theme, useTheme } from '../../services/ThemeContext' -interface Props extends EdgeSceneProps<'earnScene'> {} +interface Props extends EdgeAppSceneProps<'earnScene'> {} export interface EarnSceneParams {} diff --git a/src/components/scenes/Staking/StakeModifyScene.tsx b/src/components/scenes/Staking/StakeModifyScene.tsx index 77ee72f148f..cb138642fff 100644 --- a/src/components/scenes/Staking/StakeModifyScene.tsx +++ b/src/components/scenes/Staking/StakeModifyScene.tsx @@ -19,7 +19,7 @@ import { import { getExchangeDenomByCurrencyCode } from '../../../selectors/DenominationSelectors' import { HumanFriendlyError } from '../../../types/HumanFriendlyError' import { useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getCurrencyIconUris } from '../../../util/CdnUris' import { getTokenIdForced, getWalletTokenId } from '../../../util/CurrencyInfoHelpers' import { getWalletName } from '../../../util/CurrencyWalletHelpers' @@ -54,7 +54,7 @@ export interface StakeModifyParams { modification: ChangeQuoteRequest['action'] } -interface Props extends EdgeSceneProps<'stakeModify'> { +interface Props extends EdgeAppSceneProps<'stakeModify'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/Staking/StakeOptionsScene.tsx b/src/components/scenes/Staking/StakeOptionsScene.tsx index 02bddfbf2f2..f53b9fa2402 100644 --- a/src/components/scenes/Staking/StakeOptionsScene.tsx +++ b/src/components/scenes/Staking/StakeOptionsScene.tsx @@ -11,7 +11,7 @@ import { useIconColor } from '../../../hooks/useIconColor' import { lstrings } from '../../../locales/strings' import { StakePlugin, StakePolicy, StakePositionMap } from '../../../plugins/stake-plugins/types' import { useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getTokenIdForced } from '../../../util/CurrencyInfoHelpers' import { getPluginFromPolicy, getPolicyAssetName, getPolicyIconUris, getPolicyTitleName } from '../../../util/stakeUtils' import { darkenHexColor } from '../../../util/utils' @@ -25,7 +25,7 @@ import { cacheStyles, Theme, useTheme } from '../../services/ThemeContext' import { EdgeText } from '../../themed/EdgeText' import { SceneHeader } from '../../themed/SceneHeader' -interface Props extends EdgeSceneProps<'stakeOptions'> { +interface Props extends EdgeAppSceneProps<'stakeOptions'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/Staking/StakeOverviewScene.tsx b/src/components/scenes/Staking/StakeOverviewScene.tsx index 2d12892694e..419b40d4845 100644 --- a/src/components/scenes/Staking/StakeOverviewScene.tsx +++ b/src/components/scenes/Staking/StakeOverviewScene.tsx @@ -11,7 +11,7 @@ import { lstrings } from '../../../locales/strings' import { ChangeQuoteRequest, PositionAllocation, StakePlugin, StakePolicy, StakePosition } from '../../../plugins/stake-plugins/types' import { selectDisplayDenomByCurrencyCode } from '../../../selectors/DenominationSelectors' import { useDispatch, useSelector } from '../../../types/reactRedux' -import { EdgeSceneProps } from '../../../types/routerTypes' +import { EdgeAppSceneProps } from '../../../types/routerTypes' import { getTokenIdForced } from '../../../util/CurrencyInfoHelpers' import { getAllocationLocktimeMessage, getPolicyTitleName, getPositionAllocations } from '../../../util/stakeUtils' import { StyledButtonContainer } from '../../buttons/ButtonsView' @@ -26,7 +26,7 @@ import { MainButton } from '../../themed/MainButton' import { SceneHeader } from '../../themed/SceneHeader' import { CryptoFiatAmountTile } from '../../tiles/CryptoFiatAmountTile' -interface Props extends EdgeSceneProps<'stakeOverview'> { +interface Props extends EdgeAppSceneProps<'stakeOverview'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/SwapSettingsScene.tsx b/src/components/scenes/SwapSettingsScene.tsx index ae429ffe10d..276f307bd6a 100644 --- a/src/components/scenes/SwapSettingsScene.tsx +++ b/src/components/scenes/SwapSettingsScene.tsx @@ -13,7 +13,7 @@ import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' import { lstrings } from '../../locales/strings' import { connect } from '../../types/reactRedux' import { AccountReferral } from '../../types/ReferralTypes' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { PluginTweak } from '../../types/TweakTypes' import { getSwapPluginIconUri } from '../../util/CdnUris' import { bestOfPlugins } from '../../util/ReferralHelpers' @@ -26,7 +26,7 @@ import { SettingsSubHeader } from '../settings/SettingsSubHeader' import { SettingsSwitchRow } from '../settings/SettingsSwitchRow' import { SettingsTappableRow } from '../settings/SettingsTappableRow' -interface OwnProps extends EdgeSceneProps<'swapSettings'> {} +interface OwnProps extends EdgeAppSceneProps<'swapSettings'> {} interface DispatchProps { changePreferredSwapPlugin: (pluginId: string | undefined) => void diff --git a/src/components/scenes/SwapSuccessScene.tsx b/src/components/scenes/SwapSuccessScene.tsx index cdcc5d64699..512f10676c7 100644 --- a/src/components/scenes/SwapSuccessScene.tsx +++ b/src/components/scenes/SwapSuccessScene.tsx @@ -7,7 +7,7 @@ import { useAsyncEffect } from '../../hooks/useAsyncEffect' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { needToShowConfetti } from '../../util/show-confetti' import { SceneButtons } from '../buttons/SceneButtons' import { EdgeAnim, fadeIn } from '../common/EdgeAnim' @@ -20,7 +20,7 @@ export interface SwapSuccessParams { walletId: string } -interface Props extends EdgeSceneProps<'swapSuccess'> {} +interface Props extends EdgeAppSceneProps<'swapSuccess'> {} const confettiProps = { count: 250, @@ -42,7 +42,7 @@ export const SwapSuccessScene = (props: Props) => { const handleDone = useHandler(() => { setShowButton(false) - navigation.navigate('swapTab', { screen: 'swapCreate' }) + navigation.navigate('edgeTabs', { screen: 'swapTab', params: { screen: 'swapCreate' } }) }) const handleTransactionDetails = useHandler(() => { diff --git a/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx b/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx index 118b576ca3a..146431b11de 100644 --- a/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx +++ b/src/components/scenes/SweepPrivateKeyCalculateFeeScene.tsx @@ -18,7 +18,7 @@ import { useAsyncEffect } from '../../hooks/useAsyncEffect' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { convertTransactionFeeToDisplayFee, truncateDecimals } from '../../util/utils' import { SceneWrapper } from '../common/SceneWrapper' import { InsufficientFeesModal } from '../modals/InsufficientFeesModal' @@ -36,7 +36,7 @@ export interface SweepPrivateKeyCalculateFeeParams { sweepPrivateKeyList: SweepPrivateKeyItem[] } -interface Props extends EdgeSceneProps<'sweepPrivateKeyCalculateFee'> {} +interface Props extends EdgeAppSceneProps<'sweepPrivateKeyCalculateFee'> {} const SweepPrivateKeyCalculateFeeComponent = (props: Props) => { const { navigation, route } = props @@ -112,7 +112,9 @@ const SweepPrivateKeyCalculateFeeComponent = (props: Props) => { const handleInsufficientFunds = useHandler(async (wallet, error) => { const { countryCode } = await getFirstOpenInfo() - await Airship.show(bridge => ) + await Airship.show(bridge => ( + + )) }) const handleSlidingComplete = useHandler(() => { diff --git a/src/components/scenes/SweepPrivateKeyCompletionScene.tsx b/src/components/scenes/SweepPrivateKeyCompletionScene.tsx index 404c001394d..cc21314c667 100644 --- a/src/components/scenes/SweepPrivateKeyCompletionScene.tsx +++ b/src/components/scenes/SweepPrivateKeyCompletionScene.tsx @@ -9,7 +9,7 @@ import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' import { useAsyncEffect } from '../../hooks/useAsyncEffect' import { useHandler } from '../../hooks/useHandler' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { SceneWrapper } from '../common/SceneWrapper' import { showError } from '../services/AirshipInstance' @@ -24,7 +24,7 @@ export interface SweepPrivateKeyCompletionParams { unsignedEdgeTransactions: EdgeTransaction[] } -interface Props extends EdgeSceneProps<'sweepPrivateKeyCompletion'> {} +interface Props extends EdgeAppSceneProps<'sweepPrivateKeyCompletion'> {} const SweepPrivateKeyCompletionComponent = (props: Props) => { const { navigation, route } = props @@ -137,13 +137,13 @@ const SweepPrivateKeyCompletionComponent = (props: Props) => { label={!done ? undefined : lstrings.string_done_cap} type="secondary" marginRem={[0, 0, 1]} - onPress={() => navigation.navigate('walletsTab', { screen: 'walletList' })} + onPress={() => navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } })} /> ) }, [done, navigation, styles.bottomButton]) - const keyExtractor = useHandler((tx: EdgeTransaction) => tx.walletId + tx.tokenId ?? '') + const keyExtractor = useHandler((tx: EdgeTransaction) => tx.walletId + tx.tokenId) return ( diff --git a/src/components/scenes/SweepPrivateKeyProcessingScene.tsx b/src/components/scenes/SweepPrivateKeyProcessingScene.tsx index 0e2c3912a42..b31e53d8bea 100644 --- a/src/components/scenes/SweepPrivateKeyProcessingScene.tsx +++ b/src/components/scenes/SweepPrivateKeyProcessingScene.tsx @@ -2,7 +2,7 @@ import { EdgeCurrencyWallet, EdgeMemoryWallet, EdgeTokenId } from 'edge-core-js' import * as React from 'react' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { zeroString } from '../../util/utils' import { CancellableProcessingScene } from '../progress-indicators/CancellableProcessingScene' import { showError } from '../services/AirshipInstance' @@ -20,7 +20,7 @@ export interface SweepPrivateKeyItem { tokenId: EdgeTokenId } -interface Props extends EdgeSceneProps<'sweepPrivateKeyProcessing'> {} +interface Props extends EdgeAppSceneProps<'sweepPrivateKeyProcessing'> {} export function SweepPrivateKeyProcessingScene(props: Props) { const { route, navigation } = props @@ -81,7 +81,7 @@ export function SweepPrivateKeyProcessingScene(props: Props) { return ( {} +interface Props extends EdgeAppSceneProps<'sweepPrivateKeySelectCrypto'> {} const SweepPrivateKeySelectCryptoComponent = (props: Props) => { const { navigation, route } = props diff --git a/src/components/scenes/TransactionDetailsScene.tsx b/src/components/scenes/TransactionDetailsScene.tsx index 2c7fcfd527c..83410a04f74 100644 --- a/src/components/scenes/TransactionDetailsScene.tsx +++ b/src/components/scenes/TransactionDetailsScene.tsx @@ -19,7 +19,7 @@ import { toPercentString } from '../../locales/intl' import { lstrings } from '../../locales/strings' import { getExchangeDenom } from '../../selectors/DenominationSelectors' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getCurrencyCodeWithAccount } from '../../util/CurrencyInfoHelpers' import { matchJson } from '../../util/matchJson' import { getMemoTitle } from '../../util/memoUtils' @@ -43,7 +43,7 @@ import { Airship, showError, showToast } from '../services/AirshipInstance' import { cacheStyles, Theme, useTheme } from '../services/ThemeContext' import { EdgeText } from '../themed/EdgeText' -interface Props extends EdgeSceneProps<'transactionDetails'> { +interface Props extends EdgeAppSceneProps<'transactionDetails'> { wallet: EdgeCurrencyWallet } diff --git a/src/components/scenes/TransactionsExportScene.tsx b/src/components/scenes/TransactionsExportScene.tsx index db228fe6368..1b7cfd77647 100644 --- a/src/components/scenes/TransactionsExportScene.tsx +++ b/src/components/scenes/TransactionsExportScene.tsx @@ -12,7 +12,7 @@ import { formatDate } from '../../locales/intl' import { lstrings } from '../../locales/strings' import { getExchangeDenom, getExchangeDenomByCurrencyCode, selectDisplayDenomByCurrencyCode } from '../../selectors/DenominationSelectors' import { connect } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getTokenIdForced } from '../../util/CurrencyInfoHelpers' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { SceneWrapper } from '../common/SceneWrapper' @@ -38,7 +38,7 @@ interface File { fileName: string // wallet-btc-2020.csv } -interface OwnProps extends EdgeSceneProps<'transactionsExport'> {} +interface OwnProps extends EdgeAppSceneProps<'transactionsExport'> {} interface StateProps { account: EdgeAccount diff --git a/src/components/scenes/UpgradeUsernameScreen.tsx b/src/components/scenes/UpgradeUsernameScreen.tsx index bd1f77a7100..27a0f7f90ad 100644 --- a/src/components/scenes/UpgradeUsernameScreen.tsx +++ b/src/components/scenes/UpgradeUsernameScreen.tsx @@ -3,12 +3,12 @@ import * as React from 'react' import { useHandler } from '../../hooks/useHandler' import { useDispatch, useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { logActivity } from '../../util/logger' import { logEvent } from '../../util/tracking' import { SceneWrapper } from '../common/SceneWrapper' -interface Props extends EdgeSceneProps<'upgradeUsername'> {} +interface Props extends EdgeAppSceneProps<'upgradeUsername'> {} export const UpgradeUsernameScene = (props: Props) => { const { navigation } = props diff --git a/src/components/scenes/WalletRestoreScene.tsx b/src/components/scenes/WalletRestoreScene.tsx index 83427f9cbad..f9eefcfc6cf 100644 --- a/src/components/scenes/WalletRestoreScene.tsx +++ b/src/components/scenes/WalletRestoreScene.tsx @@ -7,7 +7,7 @@ import { useWatch } from '../../hooks/useWatch' import { toLocaleDate } from '../../locales/intl' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { FlatListItem } from '../../types/types' import { findCurrencyInfo } from '../../util/CurrencyInfoHelpers' import { logActivity } from '../../util/logger' @@ -24,7 +24,7 @@ import { SceneHeaderUi4 } from '../themed/SceneHeaderUi4' import { SimpleTextInput } from '../themed/SimpleTextInput' import { WalletListSectionHeader } from '../themed/WalletListSectionHeader' -interface Props extends EdgeSceneProps<'walletRestore'> {} +interface Props extends EdgeAppSceneProps<'walletRestore'> {} export function WalletRestoreScene(props: Props) { const { navigation } = props @@ -64,7 +64,7 @@ export function WalletRestoreScene(props: Props) { await account.changeWalletStates(states) logActivity(`Restore Wallets: ${account.username}`) - navigation.navigate('walletsTab', { screen: 'walletList' }) + navigation.navigate('edgeTabs', { screen: 'walletsTab', params: { screen: 'walletList' } }) } }) diff --git a/src/components/scenes/WcConnectScene.tsx b/src/components/scenes/WcConnectScene.tsx index e1c6b1f3bd4..7120b4c6159 100644 --- a/src/components/scenes/WcConnectScene.tsx +++ b/src/components/scenes/WcConnectScene.tsx @@ -13,7 +13,7 @@ import { useUnmount } from '../../hooks/useUnmount' import { useWalletConnect } from '../../hooks/useWalletConnect' import { useWalletName } from '../../hooks/useWalletName' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { EdgeAsset } from '../../types/types' import { truncateString } from '../../util/utils' import { ButtonsView } from '../buttons/ButtonsView' @@ -28,7 +28,7 @@ import { EdgeText } from '../themed/EdgeText' import { SceneHeader } from '../themed/SceneHeader' import { SelectableRow } from '../themed/SelectableRow' -interface Props extends EdgeSceneProps<'wcConnect'> { +interface Props extends EdgeAppSceneProps<'wcConnect'> { wallet: EdgeCurrencyWallet } @@ -80,7 +80,13 @@ export const WcConnectScene = withWallet((props: Props) => { const handleWalletListModal = useHandler(async () => { const result = await Airship.show(bridge => ( - + )) if (result?.type === 'wallet') { const { walletId } = result diff --git a/src/components/scenes/WcConnectionsScene.tsx b/src/components/scenes/WcConnectionsScene.tsx index 00c32edc8e2..bef858768d0 100644 --- a/src/components/scenes/WcConnectionsScene.tsx +++ b/src/components/scenes/WcConnectionsScene.tsx @@ -16,7 +16,7 @@ import { useMount } from '../../hooks/useMount' import { UNSUPPORTED_WC_VERSION, useWalletConnect, walletConnectClient } from '../../hooks/useWalletConnect' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps, NavigationBase } from '../../types/routerTypes' import { EdgeAsset, WcConnectionInfo } from '../../types/types' import { EdgeTouchableOpacity } from '../common/EdgeTouchableOpacity' import { SceneWrapper } from '../common/SceneWrapper' @@ -28,7 +28,7 @@ import { EdgeText } from '../themed/EdgeText' import { MainButton } from '../themed/MainButton' import { SceneHeader } from '../themed/SceneHeader' -interface Props extends EdgeSceneProps<'wcConnections'> {} +interface Props extends EdgeAppSceneProps<'wcConnections'> {} const NO_WALLETS_DAPP_REQUIREMENTS = 'NO_WALLETS_DAPP_REQUIREMENTS' export interface WcConnectionsParams { @@ -77,7 +77,13 @@ export const WcConnectionsScene = (props: Props) => { } const edgeTokenIds = getProposalNamespaceCompatibleEdgeTokenIds(proposal, account.currencyConfig) const result = await Airship.show(bridge => ( - + )) if (result?.type === 'wallet') { @@ -103,7 +109,7 @@ export const WcConnectionsScene = (props: Props) => { // Show the scam warning modal if needed await showScamWarningModal('firstWalletConnect') - if (checkAndShowLightBackupModal(account, navigation)) { + if (checkAndShowLightBackupModal(account, navigation as NavigationBase)) { return await Promise.resolve() } else { const result = await Airship.show(bridge => ( diff --git a/src/components/scenes/WcDisconnectScene.tsx b/src/components/scenes/WcDisconnectScene.tsx index a5221b62480..2bd1cc25294 100644 --- a/src/components/scenes/WcDisconnectScene.tsx +++ b/src/components/scenes/WcDisconnectScene.tsx @@ -4,7 +4,7 @@ import FastImage from 'react-native-fast-image' import { useWalletConnect } from '../../hooks/useWalletConnect' import { lstrings } from '../../locales/strings' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { WcConnectionInfo } from '../../types/types' import { EdgeCard } from '../cards/EdgeCard' import { SceneWrapper } from '../common/SceneWrapper' @@ -15,7 +15,7 @@ import { EdgeText } from '../themed/EdgeText' import { MainButton } from '../themed/MainButton' import { SceneHeader } from '../themed/SceneHeader' -interface Props extends EdgeSceneProps<'wcDisconnect'> {} +interface Props extends EdgeAppSceneProps<'wcDisconnect'> {} export interface WcDisconnectParams { wcConnectionInfo: WcConnectionInfo diff --git a/src/components/scenes/WebViewScene.tsx b/src/components/scenes/WebViewScene.tsx index 4af7cdb7b8f..21ef2faa1d8 100644 --- a/src/components/scenes/WebViewScene.tsx +++ b/src/components/scenes/WebViewScene.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { WebView } from 'react-native-webview' -import { EdgeSceneProps } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { SceneWrapper } from '../common/SceneWrapper' export interface WebViewSceneParams { @@ -9,7 +9,7 @@ export interface WebViewSceneParams { uri: string } -interface Props extends EdgeSceneProps<'webView'> {} +interface Props extends EdgeAppSceneProps<'webView'> {} export const WebViewScene = (props: Props) => { const { uri } = props.route.params diff --git a/src/components/themed/ManageTokensRow.tsx b/src/components/themed/ManageTokensRow.tsx index 57c2f183794..b8cd50098c0 100644 --- a/src/components/themed/ManageTokensRow.tsx +++ b/src/components/themed/ManageTokensRow.tsx @@ -9,7 +9,7 @@ import { useHandler } from '../../hooks/useHandler' import { usePendingPressAnimation } from '../../hooks/usePendingPress' import { lstrings } from '../../locales/strings' import { useSelector } from '../../types/reactRedux' -import { NavigationProp } from '../../types/routerTypes' +import { EdgeAppSceneProps } from '../../types/routerTypes' import { getWalletName } from '../../util/CurrencyWalletHelpers' import { logActivity } from '../../util/logger' import { EdgeTouchableOpacity } from '../common/EdgeTouchableOpacity' @@ -19,7 +19,7 @@ import { EdgeText } from './EdgeText' export interface Props { // Scene properties: - navigation: NavigationProp<'manageTokens'> + navigation: EdgeAppSceneProps<'manageTokens'>['navigation'] wallet: EdgeCurrencyWallet // Token information: