Skip to content

Handle balanceError case#2148

Merged
rickycodes merged 9 commits intodevelopfrom
bugfix/token-balance-shows-0
Feb 10, 2021
Merged

Handle balanceError case#2148
rickycodes merged 9 commits intodevelopfrom
bugfix/token-balance-shows-0

Conversation

@rickycodes
Copy link
Copy Markdown
Contributor

@rickycodes rickycodes commented Jan 20, 2021

Description

This is WIP since it relies on MetaMask/core#328

Now when a token has a balance error we display it in the UI:

image

And then on the token itself we display a warning:

image

Checklist

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

Issue

Resolves #2128

@omnat omnat added needs-design Feature that requires UI/UX design needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Jan 21, 2021
@rickycodes rickycodes removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. needs-design Feature that requires UI/UX design labels Feb 4, 2021
@rickycodes rickycodes force-pushed the bugfix/token-balance-shows-0 branch from 0ea5b9c to 75ac0c6 Compare February 9, 2021 17:01
@rickycodes rickycodes added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Feb 9, 2021
@rickycodes rickycodes marked this pull request as ready for review February 9, 2021 17:31
@rickycodes rickycodes requested a review from a team as a code owner February 9, 2021 17:31
@rickycodes rickycodes added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 9, 2021
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.

do we have this uppercased?

Copy link
Copy Markdown
Contributor Author

@rickycodes rickycodes Feb 9, 2021

Choose a reason for hiding this comment

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

I didn't add these toUpperCase() calls - only the !balanceError && check

Copy link
Copy Markdown
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

👍🏽

@ibrahimtaveras00 ibrahimtaveras00 added QA Passed QA testing has been completed and passed and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Feb 10, 2021
@rickycodes rickycodes force-pushed the bugfix/token-balance-shows-0 branch from d75a66a to b6a2c2a Compare February 10, 2021 01:24
Copy link
Copy Markdown
Contributor

@estebanmino estebanmino left a comment

Choose a reason for hiding this comment

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

👌

@rickycodes rickycodes merged commit 2a6dae0 into develop Feb 10, 2021
@rickycodes rickycodes deleted the bugfix/token-balance-shows-0 branch February 10, 2021 15:52
estebanmino added a commit that referenced this pull request Feb 16, 2021
* Remove best deals badge from WYRE transfers. (#2228)

Co-authored-by: Shivam Chaturvedi <corsairshivam@gmail.com>

* Handle `balanceError` case (#2148)

* Handle `balanceError` case

* Adjust error case

* Update handling balanceError

* Remove etherscan link

* Add metamask-controllers from disk

* Add translation strings

* Remove etherscanUrl

* Revert "Add metamask-controllers from disk"

This reverts commit 75ac0c68b99e5bf2ff190c20cccad4df74a8806f.

* Only use this style for error case

* contract metadata images bump (#2233)

* contractmetadata

* snaps

* remotesvg

* Feature/warn when replacing (#2176)

* mock login changes

* mock warning modal

* mock delete modal

* mock delete warning and submitDelete

* Add isTextDelete

* Add autoFocus

* clean up

* "delete"

* undo design changes

* Add en translations

* Update unit tests

* fix

* Make this async await and catch and log failure

* Remove 12-word

* Adjust lineHeight

* fix typo

* Add logic to show delete notification

* Hide back button

* Disable hardware back button press

* Add notification

* Add closeButtonDisabled functionality

* Update styles

* Hide back button better on Congratulations screen

* Update translation

* Add breakpoint for small devices

* add missing "a"

* fix warning modal

* Clean up BaseNotification component

* Remove added styles

* Remove eslint-disable-next-line

* Use InteractionManager

* Remove empty onHide

* update empty callback

* Cleanup

* Add flexDirection: 'row'

* Move styles to WarningExistingUserModal

* Dismiss keyboard

* Add strings to locales

* Simplify

* Add loading screen for delete

* Actually delete wallet

* Fix modal tap area

Co-authored-by: ricky <ricky@macbook.lan>

* v1.0.11 (#2238)

* version

* bump

* Update CHANGELOG.md

* update

* Update CHANGELOG

* Remove disclosure PR

* Fix circleci apk (#2240)

* resouceclass

* revert

* Revert "revert"

This reverts commit 60df2aa.

* changelog

* gaba

* swaps-tx

* MM_FOX_CODE

* swaptxs

* works

* fix

* TransactionController from controllers (#2243)

* TransactionController from controllers

* query

* changelog

* tests

* 577

* 577

* details

* transactionType

* token

* byaction

* allworking

* ceanup

* locales

* utils

* check

* edgecase

* test

* tests

* approvals

* filter

* more

Co-authored-by: Pedro Pablo Aste Kompen <wachunei@gmail.com>
Co-authored-by: Shivam Chaturvedi <corsairshivam@gmail.com>
Co-authored-by: ricky <ricky.miller@gmail.com>
Co-authored-by: ricky <ricky@macbook.lan>
rickycodes added a commit that referenced this pull request Feb 25, 2021
* develop: (48 commits)
  Fix input state (#2265)
  bump android versionCode (#2260)
  bugfix/use bignumber for transfer deeplinks (#2257)
  Fix account list scroll (#2256)
  TransactionController from controllers (#2243)
  Fix circleci apk (#2240)
  v1.0.11 (#2238)
  Feature/warn when replacing (#2176)
  contract metadata images bump (#2233)
  Handle `balanceError` case (#2148)
  Remove best deals badge from WYRE transfers. (#2228)
  @metamask/controllers@6.0.1 (#2217)
  Fix cloudflare redirects (#2180)
  Merge pull request from GHSA-wmvx-96jh-gcr4
  Update @metamask/contract-metadata (#2203)
  React Native update to 0.63 (#2078)
  Create dependabot.yml (#2204)
  Fix "Text strings must be rendered within a <Text> component" (#2193)
  Use navigate instead of push (#2191)
  Add fiat on ramp modal close button extra hit area (#2174)
  ...
rickycodes added a commit that referenced this pull request Jan 31, 2022
* Handle `balanceError` case

* Adjust error case

* Update handling balanceError

* Remove etherscan link

* Add metamask-controllers from disk

* Add translation strings

* Remove etherscanUrl

* Revert "Add metamask-controllers from disk"

This reverts commit 75ac0c68b99e5bf2ff190c20cccad4df74a8806f.

* Only use this style for error case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) next release QA Passed QA testing has been completed and passed

Projects

None yet

4 participants