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

Fix continuously refreshing balances in wallet slice #1692

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Sep 28, 2023

Fixes #1673

Fixes making transactions with the refreshed balance and displays new balance in AccountSelector.

await expect(page.getByTestId('account-balance-summary')).toContainText('123.0')
await expect(page.getByTestId('account-choice')).toContainText('123.0')
await mockApi(page, 456)
await page.waitForRequest('**/chain/account/info/*', { timeout: 60_000 })
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a slow test. ACCOUNT_REFETCHING_INTERVAL is 30 seconds. Not sure if we should change it for tests

Copy link
Contributor

Choose a reason for hiding this comment

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

based on NODE_ENV? that would be cool, on the other hand Cypress tests are slower than Playwright so not having that would not impact CI heavily. Anyway I'm fine with both, leaving it as is (and making GH issue) or extending PR with configurable interval based on env.

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed the interval based on NODE_ENV, but suspiciously test still fails, exceeding timeout

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to REACT_APP_E2E_TEST

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 28, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: b25b307
Status: ✅  Deploy successful!
Preview URL: https://e680b58d.oasis-wallet.pages.dev
Branch Preview URL: https://lw-fix-wallet-balances.oasis-wallet.pages.dev

View logs

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #1692 (670b37b) into master (2003869) will increase coverage by 0.03%.
Report is 1 commits behind head on master.
The diff coverage is 75.00%.

❗ Current head 670b37b differs from pull request most recent head b25b307. Consider uploading reports for the commit b25b307 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1692      +/-   ##
==========================================
+ Coverage   82.82%   82.85%   +0.03%     
==========================================
  Files         178      175       -3     
  Lines        4560     4469      -91     
  Branches      815      797      -18     
==========================================
- Hits         3777     3703      -74     
+ Misses        783      766      -17     
Flag Coverage Δ
cypress 48.52% <66.66%> (+0.08%) ⬆️
jest 78.25% <75.00%> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/app/state/wallet/saga.ts 95.00% <100.00%> (ø)
src/app/state/account/saga.ts 81.01% <66.66%> (+1.79%) ⬆️

... and 14 files with indirect coverage changes

Fixes making transactions with the refreshed balance and displays new balance
in AccountSelector.
@lukaw3d lukaw3d merged commit 76e1414 into master Sep 29, 2023
10 checks passed
@lukaw3d lukaw3d deleted the lw/fix-wallet-balances branch September 29, 2023 15:47
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.

Balance is not refreshed in AccountSelector and ParaTimes (after confirming deposit)
2 participants