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

Adding Support For Multiple Note Accounts #1731

Merged
merged 19 commits into from
Oct 4, 2023

Conversation

AtelyPham
Copy link
Member

Summary of changes

Provide a detailed description of proposed changes.

  • Adding support for multiple note accounts at the same time.
  • Indexing encrypted notes by account public key.
  • Allow creating note account on the wallet dropdown menu.
  • Update the note account when the user switch account from a third-party wallet (e.g. MetaMask).
    • This includes aborting the sync note progress when users switch their wallet account.
  • Adding clear cache option (with the cached size) on the menu setting dropdown.

Proposed area of change

Put an x in the boxes that apply.

  • apps/bridge-dapp
  • apps/hubble-stats
  • apps/stats-dapp
  • apps/webbsite
  • apps/faucet
  • apps/tangle-website
  • libs/webb-ui-components

Reference issue to close (if applicable)

Specify any issues that can be closed from these changes (e.g. Closes #233).

Screen Recording

If possible provide a screen recording of proposed change.

Switching note account when switching account from a third-party wallet

CleanShot.2023-10-03.at.04.51.10.mp4

The encrypted notes are updated based on the active note account

CleanShot.2023-10-03.at.04.58.59.mp4

Code Checklist

Please be sure to add .stories documentation if any additions are made to libs/webb-ui-components.

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@netlify
Copy link

netlify bot commented Oct 2, 2023

Deploy Preview for hubble-stats ready!

Name Link
🔨 Latest commit a274a9e
🔍 Latest deploy log https://app.netlify.com/sites/hubble-stats/deploys/651c4793373402000877119b
😎 Deploy Preview https://deploy-preview-1731--hubble-stats.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @AtelyPham

Name Link
🔨 Latest commit c78dae115bac5040c80f837430519e153baea29a
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/651b420e20e2040f6327fe21
😎 Deploy Preview https://651b420e20e2040f6327fe21--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @AtelyPham

Name Link
🔨 Latest commit 320b5081ee7866adb8223422da566df2b21f0b27
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/651c37c1bd0b7b3bb94ce74d
😎 Deploy Preview https://651c37c1bd0b7b3bb94ce74d--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

useEffect(() => {
let isSubscribed = true;

async function getStorageSize() {
Copy link
Member

Choose a reason for hiding this comment

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

We can use try/catch block here and also show an alert when the error is caught.

// Disconnect function
// TODO: The disconnect function does not work properly
const handleDisconnect = useCallback(async () => {
if (currentManagedWallet && currentManagedWallet.canEndSession) {
Copy link
Member

Choose a reason for hiding this comment

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

Consider implementing try/catch blocks within this and subsequent asynchronous functions to enhance error handling. Additionally, utilizing alerts to display messages in the UI can improve user experience by providing informative feedback.

@AtelyPham AtelyPham requested a review from devpavan04 October 3, 2023 16:56
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Deploy Preview for bridge-dapp development is ready! Thanks for the contribution @AtelyPham

Name Link
🔨 Latest commit a274a9eb0f905a330017ceabcc45d905f712dfe1
🔍 Latest deploy log https://app.netlify.com/sites/development-hubble-bridge/deploys/651d3cc2d736b64310eb7da3
😎 Deploy Preview https://651d3cc2d736b64310eb7da3--development-hubble-bridge.netlify.app

To edit notification comments on pull requests, go to your Netlify site settings.

@AtelyPham
Copy link
Member Author

All requested changes have been addressed. I am going to merge this PR.

@AtelyPham AtelyPham merged commit dd482b3 into develop Oct 4, 2023
@AtelyPham AtelyPham deleted the trung-tin/multiple-note-accounts branch October 4, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed ✅
2 participants