Skip to content

Update balances on account change and wallet#238

Merged
estebanmino merged 2 commits into
masterfrom
balance-on-account-change
Dec 17, 2018
Merged

Update balances on account change and wallet#238
estebanmino merged 2 commits into
masterfrom
balance-on-account-change

Conversation

@estebanmino

Copy link
Copy Markdown
Contributor

Description

This PR adds an update of balances onAccountChange, using method refresh provided by GABA AccountTrackerController.

Checklist

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

Issue

Resolves #???

@brunobar79

brunobar79 commented Dec 17, 2018

Copy link
Copy Markdown
Contributor

@estebanmino Because it's just a few people using the app for now. I'd add it on the wallet too and create an issue to migrate to the new Balanc3 API later

@estebanmino

Copy link
Copy Markdown
Contributor Author

@brunobar79 done!

@estebanmino estebanmino changed the title Update balances on account change Update balances on account change and wallet Dec 17, 2018

@brunobar79 brunobar79 left a comment

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.

LGTM!

@estebanmino estebanmino merged commit fa3b024 into master Dec 17, 2018
@estebanmino estebanmino deleted the balance-on-account-change branch December 17, 2018 17:00
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* update blances on account change

* refresh on wallet
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