FIX: import keystone wallets#8329
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: removeClippedSubviews may regress iOS rendering
- Changed
Platform.OS !== 'android'(which settrueon iOS) toPlatform.OS === 'android' ? false : undefinedso iOS keeps FlatList's default behavior.
- Changed
Or push these changes by commenting:
@cursor push f917e58687
Preview (f917e58687)
diff --git a/screen/wallets/ImportWalletDiscovery.tsx b/screen/wallets/ImportWalletDiscovery.tsx
--- a/screen/wallets/ImportWalletDiscovery.tsx
+++ b/screen/wallets/ImportWalletDiscovery.tsx
@@ -239,8 +239,9 @@
ListEmptyComponent={ListEmptyComponent}
keyExtractor={keyExtractor}
renderItem={renderItem}
- automaticallyAdjustContentInsets
- contentInsetAdjustmentBehavior="always"
+ automaticallyAdjustContentInsets={Platform.OS === 'ios'}
+ contentInsetAdjustmentBehavior={Platform.OS === 'ios' ? 'always' : 'never'}
+ removeClippedSubviews={Platform.OS === 'android' ? false : undefined}
/>
<View style={[styles.center, stylesHook.center]}>
{bip39 && (055e843 to
7a9a2a8
Compare
GladosBlueWallet
left a comment
There was a problem hiding this comment.
You fixed it. By disabling things. Classic.
| renderItem={renderItem} | ||
| automaticallyAdjustContentInsets | ||
| contentInsetAdjustmentBehavior="always" | ||
| automaticallyAdjustContentInsets={Platform.OS === 'ios'} |
There was a problem hiding this comment.
automaticallyAdjustContentInsets / contentInsetAdjustmentBehavior are iOS-focused props. Flipping them based on Platform.OS is fine, but it’s worth checking whether the underlying issue was actually Android-specific. If it was, consider isolating the change to Android-only (and leaving iOS behavior untouched) to avoid iOS regressions from subtle inset differences.
| contentInsetAdjustmentBehavior="always" | ||
| automaticallyAdjustContentInsets={Platform.OS === 'ios'} | ||
| contentInsetAdjustmentBehavior={Platform.OS === 'ios' ? 'always' : 'never'} | ||
| removeClippedSubviews={false} |
There was a problem hiding this comment.
removeClippedSubviews={false} globally disables clipping/virtualization optimizations for this list. If discovery can produce many wallets/accounts, this can turn into a memory/perf problem on low-end devices. If this is a workaround for a specific rendering bug, consider scoping it (e.g., only Android, only when the problematic condition is present, or only when wallets.length is below some threshold).

Note
Low Risk
Low risk UI-only change limited to
FlatListinset/clipping props; main risk is minor layout regressions across devices/OS versions.Overview
Fixes Android rendering/layout issues on
ImportWalletDiscoveryby makingFlatListcontent inset adjustments iOS-only and explicitly disabling them on Android.Also disables
removeClippedSubviewsto prevent items from being clipped/blank during wallet discovery scrolling.Written by Cursor Bugbot for commit 7a9a2a8. This will update automatically on new commits. Configure here.