Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet-tab): include error message when token fetching fails #5308

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

satish-ravi
Copy link
Contributor

Description

The home token balance component included a toast error message when token fetching fails. This adds the same to the wallet tab. Also added more tests for AssetsTokenBalance (used in the wallet tab) and cleaned up some redundant tests in preparation for removing the home token balance (part of cleaning up the drawer nav)

Test plan

Unit tests, manually failing the token fetch request

Related issues

Backwards compatibility

Yes

Network scalability

If a new NetworkId and/or Network are added in the future, the changes in this PR will:

  • Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)

@@ -713,109 +721,3 @@ describe.each([
expect(getElementText(tree.getByTestId('TotalTokenBalance'))).toEqual('₱-')
})
})

describe('renders the network icon on the home screen to differentiate between ETH on Ethereum, Arbitrum, and Optimism', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these tests were superfluous, as it was testing the underlying behavior of TokenIcon component using HomeTokenBalance, just updated a test in FiatExchangeTokenBalance to ensure TokenIcon is displayed when there's a single token with balance as HomeTokenBalance is going to be removed as part of the drawer nav cleanup

Copy link

emerge-tools bot commented Apr 23, 2024

📸 Snapshot Test

No snapshots generated

Name Version Added Removed Modified Unchanged Errored Approval
Celo (test)
org.celo.mobile.test
1.83.0 (148) 0 0 0 0 0 N/A

🛸 Powered by Emerge Tools

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.05%. Comparing base (24e46cd) to head (a34e796).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5308   +/-   ##
=======================================
  Coverage   86.05%   86.05%           
=======================================
  Files         747      747           
  Lines       30623    30624    +1     
  Branches     5308     5308           
=======================================
+ Hits        26353    26355    +2     
+ Misses       4038     4037    -1     
  Partials      232      232           
Files Coverage Δ
src/components/TokenBalance.tsx 98.02% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24e46cd...a34e796. Read the comment docs.

@satish-ravi satish-ravi added this pull request to the merge queue Apr 24, 2024
Merged via the queue into main with commit e3d7fad Apr 24, 2024
16 checks passed
@satish-ravi satish-ravi deleted the satish/clean-balances branch April 24, 2024 04:27
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
…lora-inc#5308)

### Description

The home token balance component included a toast error message when
token fetching fails. This adds the same to the wallet tab. Also added
more tests for AssetsTokenBalance (used in the wallet tab) and cleaned
up some redundant tests in preparation for removing the home token
balance (part of cleaning up the drawer nav)

### Test plan

Unit tests, manually failing the token fetch request

### Related issues

- Part of ACT-1133

### Backwards compatibility

Yes

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [x] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
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.

None yet

2 participants