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

General ARRR bug fixes and UI improvements #77

Merged
merged 39 commits into from
Oct 16, 2023
Merged

Conversation

CharlVS
Copy link
Member

@CharlVS CharlVS commented Oct 11, 2023

Make the ZHTLC activation process more resilient to being interrupted and for app restarts. And other bugs which were later discovered.

Changelog:

  • Fix an issue where resuming the iOS app after minimizing it would cause ARRR/ZHTLC to deactivate. The app now resyncs ARRR after minimizing.
  • ARRR/ZHTLC: Hide sapling activation mode unless test coins are enabled.
  • Rename some methods/variables and remove unused code.
  • Minor ZHTLC UI/UX improvements.
  • Set expiry for rebranding notice (November 2023).
  • Implement ZHTLC coin disable/deactivation.
  • Fixed pagination. Previously only 10 transactions max were shown. Now it will show as many as your fingers can scroll.
  • Fix issue where disabled ZHTLC coins would re-activate after restart.
  • Simplify coin details transactions list page.
  • So many other improvements. See commit history

To test (on iOS and Android):

  • Test successful initial activation of the various ARRR/ZOMBIE activation modes. Testing sapling mode activation is not required.
  • For past-date sync mode: After successful activation, restart the app and check that ZHTLC resyncs and transactions show.
  • Check that sapling activation mode only shows when test coins mode is enabled.
  • (Optional since the user is warned against it) Test what happens if the app is restarted during initial activation and during resync. We should be able to drop the warnings to the user not to do this since we can safely handle it.

@CharlVS CharlVS added the bug Something isn't working label Oct 11, 2023
@CharlVS CharlVS self-assigned this Oct 11, 2023
- Remove unused code.
- Fix minor ZHTLC bugs.

Patch one down, pass it around…
Format code for files touched in PR (NO FUNCTIONAL CHANGES IN THIS COMMIT)
@CharlVS CharlVS requested a review from kivqa October 12, 2023 12:36
@CharlVS CharlVS marked this pull request as ready for review October 12, 2023 12:36
@CharlVS CharlVS added the QA Ready for QA testing label Oct 12, 2023
@smk762 smk762 self-requested a review October 12, 2023 14:06
@kivqa
Copy link

kivqa commented Oct 12, 2023

image
Text on cancel activation pop up have to be placed on 2 lines

Tweak activation ETA calculation to be less sensitive
Fix issue where incorrect localisation messages were used and also that UX was confusing because ZHTLC activation cancellation dialog had “Cancel” and “Confirm Cancel” buttion actions.
Fix ZHTLC progress always showing 100% when resuming sync for an interrupted initial sync.
Fix a bug where there would be a sigificant delay in the dialog opening when tapping the ZHTLC activation banner.
@kivqa
Copy link

kivqa commented Oct 12, 2023

Deactivatoin broken, after app restart resync starts again and ARRR appears in the asset least

@kivqa
Copy link

kivqa commented Oct 13, 2023

Test results:
Initial activation

  • Sync new transactions on Android - activation could be completed
  • Sync new transactions on iOS - activation could be completed
  • Minimize/resume app during initial activation on Android - activation progress saved
  • Minimize/resume app during initial activation on iOS - activation progress started from 5% but moved to last progress in short period
  • Close/Launch (app restart) during initial activation on Android - activation progress started from 5%, sometimes moved to last progress in short period
  • Close/Launch (restart app) during initial activation on iOS - activation progress started from 5%, sometimes moved to last progress in short period
  • Sync from specified date on Android could be completed
  • Sync from specified date on iOS could be completed
  • Cancel activation process on Android - activation could be canceled by user, no activation started on app restart
  • Cancel activation process on iOS - activation could be canceled by user, no activation started on app restart
  • Activation from sapling option is displayed if Test Coins enabled in Settings
  • Texts for Cancel activation were improved
  • Deactivate ARRR coin and activate again in this session on Android - works as expected
  • Deactivate ARRR coin and activate again in this session on iOS - works as expected

Observed issues on initial activation:

  1. ZHTLC coin activation banner on the top does not disappear after activation completed (not 100% reproducibility), could be fixed by app restart
  2. Add coin button does not work sometimes. Exact steps are not cleat yet. Add coin button replaced by spinner when I tap (+) button and nothing happens, I waited few minutes
  3. Cancel activation button disappeared in case initial activation interrupted by app restarting. So user cant cancel activation in case if specified selected date is too old. Actually this operation could be canceled only if user re-import wallet

Activated ZHTLC coin:

  • ARRR Coin history on Android - works as expected after coin activated
  • ARRR Coin history on iOS - works as expected after coin activated
  • ARRR Sent on Android - works as expected after coin activated
  • ARRR Sent on iOS - works as expected after coin activated
  • De-activation ARRR coin on Android - works as expected after coin activated
  • De-activation ARRR coin on iOS - works as expected after coin activated
  • Swap Simple view ARRR-KMD on Android - works as expected
  • Swap Advanced view KMD-ARRR on iOS - works as expected
  • Swap ZHTLC coin restored without issues after app restarted on Android - works as expected
  • Swap ZHTLC coin restored without issues after app restarted on iOS - works as expected
  • Swap ZHTLC coin restored without issues after app minimized/resumed on Android - works as expected
  • Swap ZHTLC coin restored without issues after app minimized/resumed on iOS - works as expected

Resync

  • Resync ZHTLC coin on app restart on Android - works correctly
  • Resync ZHTLC coin on app restart on iOS - works correctly
  • Resync ZHTLC coin on app minimize/resume on Android - no need resync, ZHTLC coins do not affected by minimize/resume
  • Resync ZHTLC coin on app restart on iOS - resync started and completed successfully on minimize/resume, ZHTLC coins works as expected after that

App minimize/resume

  • ARRR History is displayed in case app resumed on Android - works correctly
  • ARRR History is displayed in case app resumed on iOS - works correctly
  • User can send ARRR in case app resumed on Android - works correctly
  • User can send ARRR in case app resumed on iOS - works correctly

Upgrade the minimum Flutter version. This will likely not change the Dart/Flutter version used for deployments but is needed to ensure we do not deploy with an unnecessarily old version and ensure we can access Dart’s `.ignore()` method.
- Fix “Cancel Activation” not showing for initial activation if restarted.
- Possibly fix issue causing infinite loading of “add coins” floating action button.
- Smooth out big progress changes.
- Other minor fixes.
@kivqa
Copy link

kivqa commented Oct 13, 2023

@CharlVS I found one scenario for endless loader on Add asset button click

  1. Launch and login to the app
  2. Click on bottom menu button Dex -> Market -> Porfolio
  3. Click (+) Add asset button
    result: Endless spinner
    applicable for both platforms

Fix bug in multi-coin activation progress and better document the logic in the progress calculation.
- Create and use an animated linear progress bar for the ZHTLC progress bar.
- Animate the appearance and disappearance of the ZHTLC progress banner.
- Ensure the activation dialog closes when complete
- Minor tweaks to ETA calculation
Create a re-usable Floating Action Button (FAB) which when tapped while not ready, will display a circular progress loader. If the FAB becomes ready after being tapped, the provided `onTap` callback will be triggered automatically.

This is useful to give the user the idea that the loading isn’t happening unless they tap the button before the loading is complete.

This is created so that it can be used for the Add coin FAB.
Fix infinite loader for “Add coins” button and refactor to use the new re-usable eager loading FAB widget.
- Fix bug where the coins page would only load the first 10 transactions and not load more transactions when scrolled to the bottom of the list.

There is also other refactoring for the coin details screen, but the root cause of the issue was improper use of layouts scrollable areas.

NB! A significant portion of the code in this commit’s diff is unchanged except for being moved as part of the refactoring. Dig deeper into the commit history for more info on the origin of this code. Using helper widget methods instead of separate widgets is not a good practice.
Move widget for animated collapse to own file + other improvements.
Fix - Fix v2 and ZHTLC pagination + refactor
@kivqa
Copy link

kivqa commented Oct 15, 2023

@CharlVS
Checked last commits: tickers were not loaded on Profile page and asset details screen for some reason checked iOS and Android builds
Other changes and activation still in testing.

Clean up coin info page header buttons (Send, receive, faucet, claim, pub key)
@smk762
Copy link
Contributor

smk762 commented Oct 16, 2023

Looking mostly good here. Process kicks on after app restart / phone reboot.
TX history display is visible and works as expected. I was able to do a swap without a problem.

I seem to be unable to do any withdrawals (on both KMD and ARRR). Nothing related seen in logs to indicate cause. This problem persisted after rebooting phone.

Screen_Recording_20231016_131215.mp4

There's some ambiguity when activating ARRR and ZOMBIE at the same time, though its not critical as ZOMBIE is just test coin.

  • Zombie remains on menu for selection if activated, then disabled, and text coin setting toggled off. Non critical.
  • I'm not sure what the PIRATE (ZHTLC) Activation bit in settings is for. Nothing happens when I tap on it. Is it a remnant that can be removed?
    image

Copy link

@kivqa kivqa left a comment

Choose a reason for hiding this comment

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

Approved. ZHTLC activation worked as expected. Known issues were fixed

Copy link
Contributor

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Thanks for the huge effort! Withdraw issues resolved and pirate functioning.

@CharlVS CharlVS merged commit 53d67ad into dev Oct 16, 2023
1 check failed
@CharlVS CharlVS deleted the zhtlc-resync-on-resume branch October 16, 2023 10:42
@CharlVS CharlVS changed the title Bug - Fix iOS ARRR Broken After App Resume General ARRR bug fixes and Oct 16, 2023
@CharlVS CharlVS changed the title General ARRR bug fixes and General ARRR bug fixes and UI improvements Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA Ready for QA testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants