Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:rainbow-me/rainbow into @matthew…
Browse files Browse the repository at this point in the history
…/fix-backups-e2e
  • Loading branch information
brunobar79 committed Dec 20, 2024
2 parents d8822cd + 0f4f232 commit 7ee9d88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/components/Discover/TrendingTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function FriendHolders({ friends }: { friends: FarcasterUser[] }) {
{friends.length > 2 && (
<Text color="labelTertiary" size="11pt" weight="bold">
{' '}
{i18n.t('trending_tokens.and_others', { count: howManyOthers })}
{i18n.t(t.and_others[howManyOthers === 1 ? 'one' : 'other'], { count: howManyOthers })}
</Text>
)}
</View>
Expand Down
10 changes: 4 additions & 6 deletions src/handlers/walletReadyEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const delay = (ms: number) =>
});

const promptForBackupOnceReadyOrNotAvailable = async (): Promise<boolean> => {
const { status } = backupsStore.getState();
if (LoadingStates.includes(status)) {
let { status } = backupsStore.getState();
while (LoadingStates.includes(status)) {
await delay(1000);
return promptForBackupOnceReadyOrNotAvailable();
status = backupsStore.getState().status;
}

logger.debug(`[walletReadyEvents]: BackupSheet: showing backup now sheet for selected wallet`);
Expand All @@ -47,9 +47,7 @@ export const runWalletBackupStatusChecks = async (): Promise<boolean> => {
const { selected } = store.getState().wallets;
if (!selected || IS_TEST) return false;

const selectedWalletNeedsBackedUp =
!selected.backedUp && !selected.damaged && selected.type !== WalletTypes.readOnly && selected.type !== WalletTypes.bluetooth;
if (selectedWalletNeedsBackedUp) {
if (!selected.backedUp && !selected.damaged && selected.type !== WalletTypes.readOnly && selected.type !== WalletTypes.bluetooth) {
logger.debug('[walletReadyEvents]: Selected wallet is not backed up, prompting backup sheet');
return promptForBackupOnceReadyOrNotAvailable();
}
Expand Down
18 changes: 0 additions & 18 deletions src/hooks/useImportingWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,24 +339,6 @@ export default function useImportingWallet({ showImportModal = true } = {}) {
});
}, 1_000);

setTimeout(() => {
// If it's not read only or hardware, show the backup sheet
if (
!(
isENSAddressFormat(input) ||
isUnstoppableAddressFormat(input) ||
isValidAddress(input) ||
isValidBluetoothDeviceId(input)
)
) {
if (!IS_TEST) {
Navigation.handleAction(Routes.BACKUP_SHEET, {
step: WalletBackupStepTypes.backup_prompt,
});
}
}
}, 1000);

analytics.track('Imported seed phrase', {
isWalletEthZero,
});
Expand Down

0 comments on commit 7ee9d88

Please sign in to comment.