Skip to content

Commit

Permalink
Merge pull request #5371 from EdgeApp/jon/smol-4.19
Browse files Browse the repository at this point in the history
Jon/smol-4.19
  • Loading branch information
Jon-edge authored Nov 26, 2024
2 parents 89d5c51 + 4ccc703 commit a1a8747
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

## 4.17.2

- added: "Add Wallet" button to bottom of `WalletListScene`
- fixed: (Zcash/Pirate) Fixed android build issues
- fixed: Default home/assets scene post-login based on last visited scene
- fixed: Receive flip input default currency selection
- removed: Keyboard autofocus from `WalletListModal`

## 4.17.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ exports[`WalletListModal should render with loading props 1`] = `
}
}
accessible={true}
autoFocus={true}
autoFocus={false}
disableAnimation={
{
"value": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ exports[`Request should render with loaded props 1`] = `
marginRem={0}
>
<Memo
forceField="crypto"
forceField="fiat"
headerCallback={[Function]}
headerText="Receive to My Bitcoin"
keyboardVisible={false}
Expand Down
3 changes: 2 additions & 1 deletion src/actions/LoginActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,12 @@ export function initializeAccount(navigation: NavigationBase, account: EdgeAccou

performance.mark('loginEnd', { detail: { isNewAccount: newAccount } })
} else {
const { defaultScreen } = getDeviceSettings()
rootNavigation.replace('edgeApp', {
screen: 'edgeAppStack',
params: {
screen: 'edgeTabs',
params: { screen: 'home' }
params: defaultScreen === 'home' ? { screen: 'home' } : { screen: 'walletsTab', params: { screen: 'walletList' } }
}
})
referralPromise.catch(() => console.log(`Failed to load account referral info`))
Expand Down
1 change: 0 additions & 1 deletion src/components/modals/WalletListModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ export function WalletListModal(props: Props) {
<ModalTitle>{headerTitle}</ModalTitle>
<SimpleTextInput
aroundRem={0.5}
autoFocus
returnKeyType="search"
placeholder={lstrings.search_wallets}
onChangeText={setSearchText}
Expand Down
2 changes: 1 addition & 1 deletion src/components/scenes/RequestScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export class RequestSceneComponent extends React.Component<Props & HookProps, St
<EdgeAnim enter={fadeInUp25}>
<EdgeCard marginRem={0}>
<ExchangedFlipInput2
forceField="crypto"
forceField="fiat"
headerCallback={this.handleOpenWalletListModal}
headerText={flipInputHeaderText}
inputAccessoryViewID={this.state.isFioMode ? inputAccessoryViewID : undefined}
Expand Down
13 changes: 11 additions & 2 deletions src/components/scenes/WalletListScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export function WalletListScene(props: Props) {
navigation.navigate('walletRestore')
})

const handlePressAddWallets = useHandler(() => {
navigation.navigate('createWalletSelectCrypto', {})
})

const tokenSupportingWalletIds = React.useMemo(() => {
const walletIds: string[] = []
for (const wallet of Object.values(account.currencyWallets)) {
Expand Down Expand Up @@ -129,8 +133,13 @@ export function WalletListScene(props: Props) {
if (isSearching && tokenSupportingWalletIds.length > 0) {
return <SceneButtons secondary={{ label: lstrings.add_custom_token, onPress: handlePressAddEditToken }} />
}
return <SceneButtons secondary={{ label: lstrings.restore_wallets_modal_title, onPress: handlePressRestoreWallets }} />
}, [handlePressAddEditToken, handlePressRestoreWallets, tokenSupportingWalletIds, isSearching])
return (
<SceneButtons
primary={{ label: lstrings.wallet_list_add_wallet, onPress: handlePressAddWallets }}
secondary={{ label: lstrings.restore_wallets_modal_title, onPress: handlePressRestoreWallets }}
/>
)
}, [isSearching, tokenSupportingWalletIds.length, handlePressAddWallets, handlePressRestoreWallets, handlePressAddEditToken])

const renderFooter: FooterRender = React.useCallback(
sceneWrapperInfo => {
Expand Down

0 comments on commit a1a8747

Please sign in to comment.