Skip to content

Move network modal toggle to redux#242

Merged
brunobar79 merged 2 commits into
masterfrom
network-modal
Dec 17, 2018
Merged

Move network modal toggle to redux#242
brunobar79 merged 2 commits into
masterfrom
network-modal

Conversation

@brunobar79

@brunobar79 brunobar79 commented Dec 17, 2018

Copy link
Copy Markdown
Contributor

Description

Made this one based on feedback from the team.
This PR allow us to switch networks from any view (except when you have a website loaded)
DEMO: http://recordit.co/6kWWbCfsDS

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@brunobar79 brunobar79 requested review from bitpshr and estebanmino and removed request for estebanmino December 17, 2018 19:50

onNetworkPress = () => {
this.setState({ networksModalVisible: true });
this.props.toggleNetworkModal();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think these props should either be checked for existence before being called or marked as required via proptypes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

@brunobar79 brunobar79 merged commit 820d1b8 into master Dec 17, 2018
@brunobar79 brunobar79 deleted the network-modal branch February 11, 2019 21:40
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* move network modal toggle to redux

* make props required
github-merge-queue Bot pushed a commit that referenced this pull request Mar 31, 2026
<!--
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?
-->
`@metamask/tron-wallet-snap` has been updated to `^1.25.0` to include
the following changes:
```markdown
## [1.25.0]

### Changed

- Optimize account discovery by using a lightweight activity check (`limit=1`) instead of fetching full transaction history ([#252](MetaMask/snap-tron-wallet#252))

### Fixed

- Avoid `onAmountInput` fee estimation failures by skipping fee validation until a recipient address is available ([#259](MetaMask/snap-tron-wallet#259))
- Assert transaction structure at all entry points, rejecting malformed transactions ([#237](MetaMask/snap-tron-wallet#237))
- Disable scanning of unsupported contract types, preventing incorrect security alerts from blocking user flows ([#238](MetaMask/snap-tron-wallet#238))
  - Supported transactions are those single-contract interaction transactions of the following types: `TransferContract`, `CreateSmartContract`, `TriggerSmartContract`.
  - Unsupported transactions will show empty estimated changes and allow the user to proceed without blocking the confirmation.
- Correctly fetch and return staking rewards ([#242](MetaMask/snap-tron-wallet#242))
- Fix revert simulation error when sending TRC20 tokens ([#261](MetaMask/snap-tron-wallet#261))
- Fix infinite loading during fee estimation ([#258](MetaMask/snap-tron-wallet#258))
  - The issue was caused by a deadlock during cache updates of chain parameters.
```

## **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: Fixed a bug that was causing issues with TRC20 token
transfers

## **Related issues**

Fixes:

## **Manual testing steps**

1. Initiate a TRC20 token transfer (e.g., USDT) 
2. Type in a valid recipient address and amount
3. Observe that the button does not show an error
4. Click the button to proceed with the transfer
5. Observe that the confirmation screen is shown with no simulation
error

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

https://github.com/user-attachments/assets/e7b55fc3-9e80-4b44-8558-4cbbd9d38f62

## **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.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Dependency-only version bump with no direct code changes in this repo;
risk is limited to any upstream behavioral changes in the TRON snap
affecting TRON-specific flows.
> 
> **Overview**
> Bumps `@metamask/tron-wallet-snap` from `1.24.0` to `^1.25.0` in
`package.json`, updating the resolved version to `1.25.0` in
`yarn.lock`.
> 
> No application code changes; this is a dependency-only update intended
to pick up upstream fixes and behavior changes in the TRON snap.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
0a08885. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants