Skip to content

Commit

Permalink
chore(runway): cherry-pick fix: cp-7.41.0 Prevent flickering on `Retr…
Browse files Browse the repository at this point in the history
…yModal` (#13669)

- fix: cp-7.41.0 Prevent flickering on `RetryModal` (#13637)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR relocates `RetryModal` to stop flickering in
`TransactionsHistory` screen.

## **Related issues**

Fixes: #13547

## **Manual testing steps**

See issue #13547

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [X] 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).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] 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.
[bee0c07](bee0c07)

Co-authored-by: OGPoyraz <[email protected]>
  • Loading branch information
runway-github[bot] and OGPoyraz authored Feb 21, 2025
1 parent 1f4d3c2 commit 812eeb0
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 7 deletions.
13 changes: 6 additions & 7 deletions app/components/UI/Transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -861,13 +861,6 @@ class Transactions extends PureComponent {
descriptionText={strings('transaction.speedup_tx_message')}
/>
)}

<RetryModal
onCancelPress={() => this.toggleRetry(undefined)}
onConfirmPress={this.retry}
retryIsOpen={this.state.retryIsOpen}
errorMsg={this.state.errorMsg}
/>
</View>
);
};
Expand All @@ -885,6 +878,12 @@ class Transactions extends PureComponent {
{(this.state.speedUp1559IsOpen || this.state.cancel1559IsOpen) &&
this.renderUpdateTxEIP1559Gas(this.state.cancel1559IsOpen)}
</View>
<RetryModal
onCancelPress={() => this.toggleRetry(undefined)}
onConfirmPress={this.retry}
retryIsOpen={this.state.retryIsOpen}
errorMsg={this.state.errorMsg}
/>
</PriceChartProvider>
);
};
Expand Down
58 changes: 58 additions & 0 deletions app/components/Views/Asset/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,35 @@ exports[`Asset should not display swaps button if the asset is not allowed 1`] =
/>
</View>
</View>
<Modal
animationType="none"
deviceHeight={null}
deviceWidth={null}
hardwareAccelerated={false}
hideModalContentWhileAnimating={false}
onBackdropPress={[Function]}
onModalHide={[Function]}
onModalWillHide={[Function]}
onModalWillShow={[Function]}
onRequestClose={[Function]}
onSwipeComplete={[Function]}
panResponderThreshold={4}
scrollHorizontal={false}
scrollOffset={0}
scrollOffsetMax={0}
scrollTo={null}
statusBarTranslucent={false}
supportedOrientations={
[
"portrait",
"landscape",
]
}
swipeDirection="down"
swipeThreshold={100}
transparent={true}
visible={false}
/>
</View>
`;

Expand Down Expand Up @@ -75,5 +104,34 @@ exports[`Asset should render correctly 1`] = `
/>
</View>
</View>
<Modal
animationType="none"
deviceHeight={null}
deviceWidth={null}
hardwareAccelerated={false}
hideModalContentWhileAnimating={false}
onBackdropPress={[Function]}
onModalHide={[Function]}
onModalWillHide={[Function]}
onModalWillShow={[Function]}
onRequestClose={[Function]}
onSwipeComplete={[Function]}
panResponderThreshold={4}
scrollHorizontal={false}
scrollOffset={0}
scrollOffsetMax={0}
scrollTo={null}
statusBarTranslucent={false}
supportedOrientations={
[
"portrait",
"landscape",
]
}
swipeDirection="down"
swipeThreshold={100}
transparent={true}
visible={false}
/>
</View>
`;

0 comments on commit 812eeb0

Please sign in to comment.