Skip to content

Commit f729a9e

Browse files
authored
fix: Reveal Private Credentials cp-7.54.0 (MetaMask#18484)
## **Description** 1. What is the reason for the change? - While testing the latest RC (7.54.0) we noticed that the reveal private credentials page (SRP and Private Key) were broken on Android. - Clicking the password input field caused the page content to be pushed to the very top which made it unreadable. 2. What is the improvement/solution? - This issue was caused by the nested scrollview not applying the flexGrow to the children. I removed the scrollview in favour of a standard view and passed in the style flexGrow. - I also refined the styles (removed unnecessary padding) so that the Done button could fit on one page without scrolling. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/MUL-558 ## **Manual testing steps** ```gherkin Feature: Reveal private credential Scenario: user clicks on the three dot menu inside the account list and it takes them to the account details page Given a user click on reveal Secret recovery phrase Given a user completes the SRP reveal quiz When a user clicks on the password text field Then the password field should remain in view of the user at all times Given the user types the correct password Then their SRP should be revealed repeat the above steps with reveal private key ``` ## **Screenshots/Recordings** ### **Before** https://github.com/user-attachments/assets/7fe2ad7a-4695-4d08-8202-0a71a7b5338c ### **After** https://github.com/user-attachments/assets/379f2479-324d-4a3a-8f6d-4969528f0591 <img width="350" height="700" alt="Simulator Screenshot - iPhone 15 Pro - 2025-08-21 at 15 17 26" src="https://github.com/user-attachments/assets/c1fe2644-a493-4c06-a600-2410b159a22c" /> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 89081bc commit f729a9e

5 files changed

Lines changed: 1292 additions & 1347 deletions

File tree

app/components/Views/MultichainAccounts/WalletDetails/BaseWalletDetails/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,7 @@ export const BaseWalletDetails = ({
265265
onSwipeComplete={handleCloseAddAccountModal}
266266
backdropOpacity={0.5}
267267
>
268-
<View
269-
style={[
270-
styles.modalContent,
271-
{ backgroundColor: colors.background.default },
272-
]}
273-
>
268+
<View style={styles.modalContent}>
274269
<WalletAddAccountActions
275270
keyringId={keyringId}
276271
onBack={handleCloseAddAccountModal}

app/components/Views/MultichainAccounts/WalletDetails/BaseWalletDetails/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const styleSheet = (params: { theme: Theme }) => {
9898
modalContent: {
9999
borderTopLeftRadius: 20,
100100
borderTopRightRadius: 20,
101+
backgroundColor: colors.background.default,
101102
},
102103
});
103104
};

app/components/Views/RevealPrivateCredential/RevealPrivateCredential.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ const RevealPrivateCredential = ({
423423
>
424424
<CustomTabView
425425
tabLabel={strings(`reveal_credential.text`)}
426-
style={styles.tabContent}
427426
testID={RevealSeedViewSelectorsIDs.TAB_SCROLL_VIEW_TEXT}
428427
>
429428
<Text style={styles.boldText}>
@@ -459,7 +458,6 @@ const RevealPrivateCredential = ({
459458
</CustomTabView>
460459
<CustomTabView
461460
tabLabel={strings(`reveal_credential.qr_code`)}
462-
style={styles.tabContent}
463461
testID={RevealSeedViewSelectorsIDs.TAB_SCROLL_VIEW_QR_CODE}
464462
>
465463
<View
@@ -635,7 +633,7 @@ const RevealPrivateCredential = ({
635633

636634
return (
637635
<View
638-
style={[styles.wrapper]}
636+
style={styles.wrapper}
639637
testID={RevealSeedViewSelectorsIDs.REVEAL_CREDENTIAL_CONTAINER_ID}
640638
>
641639
<ActionView
@@ -658,15 +656,14 @@ const RevealPrivateCredential = ({
658656
scrollViewTestID={
659657
RevealSeedViewSelectorsIDs.REVEAL_CREDENTIAL_SCROLL_ID
660658
}
661-
contentContainerStyle={styles.stretch}
662659
// The cancel button here is not named correctly. When it is unlocked, the button is shown as "Done"
663660
showCancelButton={Boolean(showCancelButton || unlocked)}
664661
enableOnAndroid
665662
enableAutomaticScroll
666663
extraScrollHeight={40}
667664
showsVerticalScrollIndicator={false}
668665
>
669-
<ScrollView>
666+
<View>
670667
<View style={[styles.rowWrapper, styles.normalText]}>
671668
{isPrivateKey && account ? (
672669
<>
@@ -695,7 +692,7 @@ const RevealPrivateCredential = ({
695692
{renderPasswordEntry()}
696693
</View>
697694
)}
698-
</ScrollView>
695+
</View>
699696
</ActionView>
700697
{renderModal(isPrivateKey)}
701698

0 commit comments

Comments
 (0)