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/smol-4.19 #5371

Merged
merged 4 commits into from
Nov 26, 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
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
Loading