Page MenuHomePhabricator

[Cashtab] Remove passLoadingStatus from components that do not require UI locking
ClosedPublic

Authored by bytesofman on Mar 8 2024, 14:32.

Details

Summary

This prop was initially used to lock the UI when the wallet utxo set was refreshing, which could take some time (~5-10s) in the bch-api days.

Now this is much faster, and the UI is locked by useWallet.js while the wallet is being updated.

Let useWallet.js handle the UI locking for utxo set updates. Keep passLoadingStatus in the Alias and Airdrop components, where it is used to lock the UI while waiting for other server queries.

Test Plan

npm test, npm start and send some ecash and etoken txs, confirm you are not able to run into the 'invalid utxo missing or spent' error

Diff Detail

Repository
rABC Bitcoin ABC
Branch
no-more-passloadingstatus
Lint
Lint Errors
SeverityLocationCodeMessage
Errorcashtab/src/components/Configure/Configure.js:6ESLINTno-unused-vars
Errorcashtab/src/components/Send/SendToken.js:121ESLINTno-unused-vars
Unit
No Test Coverage
Build Status
Buildable 27745
Build 55053: Build Diffcashtab-tests
Build 55052: arc lint + arc unit

Event Timeline

Tail of the build log:

Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 236 packages, and audited 237 packages in 2s

35 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
/work/cashtab /work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated @babel/plugin-proposal-private-property-in-object@7.21.11: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0

added 1722 packages, and audited 1723 packages in 22s

263 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

> cashtab@2.0.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/components/Configure/Configure.js
  Line 6:8:  'PropTypes' is defined but never used  no-unused-vars

src/components/Send/SendToken.js
  Line 121:11:  'previousWalletState' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1
bytesofman published this revision for review.Mar 8 2024, 14:53
This revision is now accepted and ready to land.Mar 8 2024, 20:03