-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into android_footer_fix
- Loading branch information
Showing
99 changed files
with
4,828 additions
and
534 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import { | ||
StyleSheet, | ||
View, | ||
} from 'react-native'; | ||
import ScreenView from '../../Base/ScreenView'; | ||
import { useTheme } from '../../../util/theme'; | ||
import Text from '../../../component-library/components/Texts/Text'; | ||
|
||
const createStyles = (colors) => | ||
StyleSheet.create({ | ||
container: { backgroundColor: colors.background.default }, | ||
content: { | ||
flexGrow: 1, | ||
justifyContent: 'center', | ||
}, | ||
}); | ||
|
||
const BridgeView = () => { | ||
const { colors } = useTheme(); | ||
const styles = createStyles(colors); | ||
|
||
return ( | ||
<ScreenView | ||
style={styles.container} | ||
contentContainerStyle={styles.screen} | ||
keyboardShouldPersistTaps="handled" | ||
> | ||
<View style={styles.content}> | ||
<Text>Bridge</Text> | ||
</View> | ||
</ScreenView> | ||
); | ||
}; | ||
|
||
export default BridgeView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from 'react'; | ||
import renderWithProvider, { | ||
DeepPartial, | ||
} from '../../../util/test/renderWithProvider'; | ||
import { backgroundState } from '../../../util/test/initial-root-state'; | ||
import { RootState } from '../../../reducers'; | ||
import BridgeView from './'; | ||
|
||
jest.mock('@react-navigation/native', () => { | ||
const actualNav = jest.requireActual('@react-navigation/native'); | ||
return { | ||
...actualNav, | ||
useNavigation: () => ({ | ||
setOptions: jest.fn(), | ||
pop: jest.fn(), | ||
navigate: jest.fn(), | ||
}), | ||
useRoute: () => ({}), | ||
}; | ||
}); | ||
|
||
jest.mock('../../../core/Engine', () => ({ | ||
context: { | ||
SwapsController: { | ||
fetchAggregatorMetadataWithCache: jest.fn(), | ||
fetchTopAssetsWithCache: jest.fn(), | ||
fetchTokenWithCache: jest.fn(), | ||
}, | ||
}, | ||
})); | ||
|
||
const mockInitialState: DeepPartial<RootState> = { | ||
engine: { | ||
backgroundState: { | ||
...backgroundState, | ||
}, | ||
}, | ||
}; | ||
|
||
describe('BridgeView', () => { | ||
it('renders', async () => { | ||
const { getByText } = renderWithProvider(<BridgeView />, { | ||
state: mockInitialState, | ||
}); | ||
expect(getByText('Bridge')).toBeDefined(); | ||
}); | ||
}); |
Oops, something went wrong.