Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jon/scene-navigation-types #5320

Merged
merged 8 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- changed: Add explicit gas limit for Kiln staking.
- 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: Correctly report ETH Kiln balances
- fixed: Fix error massaging in trackError
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/components/TransactionListTop.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TestRenderer from 'react-test-renderer'
import { TransactionListTop } from '../../components/themed/TransactionListTop'
import { ENV } from '../../env'
import { FakeProviders, FakeState } from '../../util/fake/FakeProviders'
import { fakeNavigation } from '../../util/fake/fakeSceneProps'
import { fakeCompositeNavigation } from '../../util/fake/fakeSceneProps'

describe('TransactionListTop', () => {
const currencyInfo: EdgeCurrencyInfo = {
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('TransactionListTop', () => {
<FakeProviders initialState={fakeState}>
<TransactionListTop
isEmpty={false}
navigation={fakeNavigation}
navigation={fakeCompositeNavigation}
searching={false}
tokenId={null}
wallet={fakeWallet}
Expand All @@ -87,7 +87,7 @@ describe('TransactionListTop', () => {
<FakeProviders initialState={fakeState}>
<TransactionListTop
isEmpty={false}
navigation={fakeNavigation}
navigation={fakeCompositeNavigation}
searching={false}
tokenId={null}
wallet={fakeWallet}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/ChangePasswordScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -14,7 +14,7 @@ describe('ChangePasswordScene', () => {

const actual = renderer.render(
<FakeProviders initialState={rootState}>
<ChangePasswordScene {...fakeSceneProps('changePassword', undefined)} />
<ChangePasswordScene {...fakeEdgeAppSceneProps('changePassword', undefined)} />
</FakeProviders>
)

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/ChangePinScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -14,7 +14,7 @@ describe('ChangePinComponent', () => {

const actual = renderer.render(
<FakeProviders initialState={rootState}>
<ChangePinScene {...fakeSceneProps('changePin', undefined)} />
<ChangePinScene {...fakeEdgeAppSceneProps('changePin', undefined)} />
</FakeProviders>
)

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CreateWalletAccountSetupScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -26,7 +26,7 @@ describe('CreateWalletAccountSelect', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockState}>
<CreateWalletAccountSetupScene
{...fakeSceneProps('createWalletAccountSetup', {
{...fakeEdgeAppSceneProps('createWalletAccountSetup', {
accountHandle: '',
isReactivation: true,
walletId: '332s0ds39f'
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CreateWalletEditNameScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import TestRenderer from 'react-test-renderer'

import { CreateWalletEditNameScene } from '../../components/scenes/CreateWalletEditNameScene'
import { FakeProviders, FakeState } from '../../util/fake/FakeProviders'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('CreateWalletEditNameComponent', () => {
const mockState: FakeState = {
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('CreateWalletEditNameComponent', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockState}>
<CreateWalletEditNameScene
{...fakeSceneProps('createWalletEditName', {
{...fakeEdgeAppSceneProps('createWalletEditName', {
createWalletList: [
{
type: 'create',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CreateWalletImportScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TestRenderer from 'react-test-renderer'
import { CreateWalletImportScene } from '../../components/scenes/CreateWalletImportScene'
import { defaultAccount } from '../../reducers/CoreReducer'
import { FakeProviders, FakeState } from '../../util/fake/FakeProviders'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

jest.mock('react-native-keyboard-aware-scroll-view', () => {
const KeyboardAwareScrollView = (blob: { children: React.ReactNode }) => blob.children
Expand Down Expand Up @@ -33,7 +33,7 @@ describe('CreateWalletImportScene', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockState}>
<CreateWalletImportScene
{...fakeSceneProps('createWalletImport', {
{...fakeEdgeAppSceneProps('createWalletImport', {
createWalletList: [
{
type: 'create',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CreateWalletSelectCryptoScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import TestRenderer from 'react-test-renderer'

import { CreateWalletSelectCryptoScene } from '../../components/scenes/CreateWalletSelectCryptoScene'
import { FakeProviders, FakeState } from '../../util/fake/FakeProviders'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('CreateWalletSelectCrypto', () => {
const mockState: FakeState = {
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('CreateWalletSelectCrypto', () => {
it('should render with loading props', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockState}>
<CreateWalletSelectCryptoScene {...fakeSceneProps('createWalletSelectCrypto', {})} />
<CreateWalletSelectCryptoScene {...fakeEdgeAppSceneProps('createWalletSelectCrypto', {})} />
</FakeProviders>
)

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CurrencyNotificationScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -24,7 +24,7 @@ describe('CurrencyNotificationComponent', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockStore}>
<CurrencyNotificationScene
{...fakeSceneProps('currencyNotificationSettings', {
{...fakeEdgeAppSceneProps('currencyNotificationSettings', {
currencyInfo: {
pluginId: 'bitcoin',
displayName: 'Bitcoin',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/CurrencySettings.ui.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TestRenderer from 'react-test-renderer'
import { CurrencySettingsScene } from '../../components/scenes/CurrencySettingsScene'
import { defaultAccount } from '../../reducers/CoreReducer'
import { FakeProviders, FakeState } from '../../util/fake/FakeProviders'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('CurrencySettings', () => {
it('should render', () => {
Expand Down Expand Up @@ -37,7 +37,7 @@ describe('CurrencySettings', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={state}>
<CurrencySettingsScene
{...fakeSceneProps('currencySettings', {
{...fakeEdgeAppSceneProps('currencySettings', {
currencyInfo
})}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/DefaultFiatSettingScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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', () => {
const renderer = createRenderer()

const actual = renderer.render(
<DefaultFiatSettingComponent
{...fakeSceneProps('defaultFiatSetting', undefined)}
{...fakeEdgeAppSceneProps('defaultFiatSetting', undefined)}
supportedFiats={[
{
label: 'Dollars',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/EdgeLoginScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TestRenderer from 'react-test-renderer'
import { EdgeLoginScene } from '../../components/scenes/EdgeLoginScene'
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'

let account: EdgeAccount | undefined

Expand All @@ -17,7 +17,7 @@ describe('EdgeLoginScene', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={rootState}>
<EdgeLoginScene
{...fakeSceneProps('edgeLogin', {
{...fakeEdgeAppSceneProps('edgeLogin', {
lobbyId: 'AmNsSBDVeF2837'
})}
/>
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioAddressDetailsScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -24,7 +24,7 @@ describe('FioAddressDetails', () => {

const actual = renderer.render(
<FioAddressDetails
{...fakeSceneProps('fioAddressDetails', {
{...fakeEdgeAppSceneProps('fioAddressDetails', {
fioAddressName: 'Fio@edge',
bundledTxs: 100
})}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioAddressListScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioAddressList } from '../../components/scenes/Fio/FioAddressListScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioAddressList', () => {
it('should render with loading props', () => {
Expand All @@ -23,7 +23,7 @@ describe('FioAddressList', () => {

const actual = renderer.render(
<FioAddressList
{...fakeSceneProps('fioAddressList', undefined)}
{...fakeEdgeAppSceneProps('fioAddressList', undefined)}
fioAddresses={[
{
name: 'fio@edge',
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioAddressRegisterScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioAddressRegister } from '../../components/scenes/Fio/FioAddressRegisterScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioAddressRegister', () => {
it('should render with loading props', () => {
Expand All @@ -23,7 +23,7 @@ describe('FioAddressRegister', () => {

const actual = renderer.render(
<FioAddressRegister
{...fakeSceneProps('fioAddressRegister', undefined)}
{...fakeEdgeAppSceneProps('fioAddressRegister', undefined)}
fioWallets={[fakeWallet]}
fioPlugin={
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioAddressRegistered } from '../../components/scenes/Fio/FioAddressRegisteredScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioAddressRegistered', () => {
it('should render with loading props', () => {
const renderer = createRenderer()

const actual = renderer.render(
<FioAddressRegistered
{...fakeSceneProps('fioAddressRegisterSuccess', {
{...fakeEdgeAppSceneProps('fioAddressRegisterSuccess', {
fioName: 'MyFio@edge'
})}
theme={getTheme()}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioAddressRegisteredScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioAddressRegistered } from '../../components/scenes/Fio/FioAddressRegisteredScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioAddressRegistered', () => {
it('should render with loading props', () => {
const renderer = createRenderer()

const actual = renderer.render(
<FioAddressRegistered
{...fakeSceneProps('fioAddressRegisterSuccess', {
{...fakeEdgeAppSceneProps('fioAddressRegisterSuccess', {
fioName: 'myFio@edge'
})}
theme={getTheme()}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioAddressSettingsScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioAddressSettingsComponent } from '../../components/scenes/Fio/FioAddressSettingsScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioAddressSettingsComponent', () => {
it('should render with loading props', () => {
Expand All @@ -24,7 +24,7 @@ describe('FioAddressSettingsComponent', () => {

const actual = renderer.render(
<FioAddressSettingsComponent
{...fakeSceneProps('fioAddressSettings', {
{...fakeEdgeAppSceneProps('fioAddressSettings', {
walletId: fakeWallet.id,
fioAddressName: 'MyFioAddress'
})}
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioConnectWalletConfirmScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioConnectWalletConfirm } from '../../components/scenes/Fio/FioConnectWalletConfirmScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioConnectWalletConfirm', () => {
it('should render with loading props', () => {
Expand All @@ -24,7 +24,7 @@ describe('FioConnectWalletConfirm', () => {

const actual = renderer.render(
<FioConnectWalletConfirm
{...fakeSceneProps('fioConnectToWalletsConfirm', {
{...fakeEdgeAppSceneProps('fioConnectToWalletsConfirm', {
walletId: fakeWallet.id,
fioAddressName: 'MyFioAddress',
walletsToConnect: [],
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/scenes/FioDomainRegisterScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { FioDomainRegister } from '../../components/scenes/Fio/FioDomainRegisterScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('FioDomainRegister', () => {
it('should render with loading props', () => {
Expand All @@ -20,7 +20,7 @@ describe('FioDomainRegister', () => {

const actual = renderer.render(
<FioDomainRegister
{...fakeSceneProps('fioDomainRegister', undefined)}
{...fakeEdgeAppSceneProps('fioDomainRegister', undefined)}
fioWallets={[fakeWallet]}
fioPlugin={
{
Expand Down
8 changes: 4 additions & 4 deletions src/__tests__/scenes/RequestScene.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { createRenderer } from 'react-test-renderer/shallow'

import { RequestSceneComponent } from '../../components/scenes/RequestScene'
import { getTheme } from '../../components/services/ThemeContext'
import { fakeSceneProps } from '../../util/fake/fakeSceneProps'
import { fakeEdgeAppSceneProps } from '../../util/fake/fakeSceneProps'

describe('Request', () => {
it('should render with loading props', () => {
const renderer = createRenderer()

const actual = renderer.render(
<RequestSceneComponent
{...fakeSceneProps('request', { tokenId: null, walletId: '' })}
{...fakeEdgeAppSceneProps('request', { tokenId: null, walletId: '' })}
isConnected={false}
isLightAccount={false}
fioAddressesExist={false}
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('Request', () => {

const actual = renderer.render(
<RequestSceneComponent
{...fakeSceneProps('request', { tokenId: null, walletId: '' })}
{...fakeEdgeAppSceneProps('request', { tokenId: null, walletId: '' })}
isConnected={false}
isLightAccount={false}
fioAddressesExist={false}
Expand Down Expand Up @@ -70,7 +70,7 @@ describe('Request', () => {

const actual = renderer.render(
<RequestSceneComponent
{...fakeSceneProps('request', { tokenId: null, walletId: '' })}
{...fakeEdgeAppSceneProps('request', { tokenId: null, walletId: '' })}
isConnected={false}
isLightAccount
fioAddressesExist={false}
Expand Down
Loading
Loading