-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: Fix network picker in IAB not reflecting dapp selected network #28285
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
Changes from 4 commits
43de120
11cd1db
5aa5807
41f5206
155917c
6870b95
99487f7
eeb53c5
9c4cbaa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export interface AccountRightButtonProps { | ||
| selectedAddress: string; | ||
| onPress: () => void; | ||
| dappOrigin: string; | ||
| } |
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes can be pulled into a separate PR
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ | |
| import React from 'react'; | ||
| import NavbarTitle from '../NavbarTitle'; | ||
| import ModalNavbarTitle from '../ModalNavbarTitle'; | ||
| import AccountRightButton from '../AccountRightButton'; | ||
| import { | ||
| Alert, | ||
| Image, | ||
|
|
@@ -141,52 +140,6 @@ const styles = StyleSheet.create({ | |
|
|
||
| const metamask_name = require('../../../images/branding/metamask-name.png'); // eslint-disable-line | ||
| const metamask_fox = require('../../../images/branding/fox.png'); // eslint-disable-line | ||
| /** | ||
| * Function that returns the navigation options | ||
| * This is used by views that will show our custom navbar | ||
| * which contains accounts icon, Title or MetaMask Logo and current network, and settings icon | ||
| * | ||
| * @param {string} title - Title in string format | ||
| * @param {Object} navigation - Navigation object required to push new views | ||
| * @param {bool} disableNetwork - Boolean that specifies if the network can be changed, defaults to false | ||
| * @returns {Object} - Corresponding navbar options containing headerTitle, headerLeft, headerTruncatedBackTitle and headerRight | ||
| */ | ||
| export function getTransactionsNavbarOptions( | ||
|
||
| title, | ||
| themeColors, | ||
| _, | ||
| selectedAddress, | ||
| handleRightButtonPress, | ||
| ) { | ||
| const innerStyles = StyleSheet.create({ | ||
| headerStyle: { | ||
| backgroundColor: themeColors.background.default, | ||
| shadowColor: importedColors.transparent, | ||
| elevation: 0, | ||
| }, | ||
| headerIcon: { | ||
| color: themeColors.primary.default, | ||
| }, | ||
| headerButtonText: { | ||
| color: themeColors.primary.default, | ||
| fontSize: 14, | ||
| ...fontStyles.normal, | ||
| }, | ||
| }); | ||
|
|
||
| return { | ||
| headerTitle: () => <NavbarTitle title={title} />, | ||
| headerLeft: null, | ||
| headerRight: () => ( | ||
| <AccountRightButton | ||
| selectedAddress={selectedAddress} | ||
| onPress={handleRightButtonPress} | ||
| /> | ||
| ), | ||
| headerStyle: innerStyles.headerStyle, | ||
| headerTintColor: themeColors.primary.default, | ||
| }; | ||
| } | ||
|
|
||
| /** | ||
| * Function that returns the navigation options | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be reverted. My local android build isn't working without this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok weird. No idea. lets revert before we merge I think