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-mobile: add shimmer claiming #5590

Merged
merged 12 commits into from Jan 26, 2023
Merged

Conversation

paul-boegelsack
Copy link
Contributor

@paul-boegelsack paul-boegelsack commented Jan 16, 2023

Summary

Setup shimmer claiming for mobile onboarding

Changelog

- Adds shimmer claiming router
- Adds reward and success view for claiming
- Adds a claiming list component for mobile

Testing

Platforms

Please select any platforms where your changes have been tested.

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Instructions

Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.

...

Checklist

Please tick all of the following boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

Copy link
Member

@begonaalvarezd begonaalvarezd left a comment

Choose a reason for hiding this comment

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

Im getting an error when I try to claim my rewards

Error: Unable to initialize Shimmer claiming account
    at initialiseFirstShimmerClaimingAccount

line throw new CannotInitialiseShimmerClaimingAccountError()

@paul-boegelsack
Copy link
Contributor Author

@Tuditi "Stronghold reported a procedure error: engine: fatal engine error: vault VaultId(TcAMhLekJE6GhvWh6qTYL-T2DKgaUKz7) does not exist" is thrown at initialiseFirstShimmerClaimingAccount.ts line 35.

@paul-boegelsack
Copy link
Contributor Author

Im getting an error when I try to claim my rewards

Error: Unable to initialize Shimmer claiming account
    at initialiseFirstShimmerClaimingAccount

line throw new CannotInitialiseShimmerClaimingAccountError()

Should work now thanks to @Tuditi

@paul-boegelsack paul-boegelsack marked this pull request as ready for review January 18, 2023 13:40
Copy link
Contributor

@maxwellmattryan maxwellmattryan left a comment

Choose a reason for hiding this comment

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

Have one tiny requested change - looks great!

@maxwellmattryan
Copy link
Contributor

I'm getting this error when trying to claim in a scenario where I've got funds on account index 2, address index 5:

TypeError: Cannot read properties of undefined (reading 'toString')
    at getAccountAssetsForSelectedAccount (getAccountAssetsForSelectedAccount.ts:16:1)
    at selected-account-assets.store.ts:42:1
    at sync (index.mjs:77:1)
    at index.mjs:95:1
    at Object.subscribe (index.mjs:48:1)
    at subscribe (index.mjs:55:1)
    at get_store_value (index.mjs:60:1)
    at getOutputOptions (getOutputOptions.ts:24:1)
    at claimShimmerRewardsForShimmerClaimingAccount (claimShimmerRewards.ts:67:1)
    at async claimShimmerRewardsForShimmerClaimingAccounts (claimShimmerRewards.ts:42:1)

@paul-boegelsack
Copy link
Contributor Author

I'm getting this error when trying to claim in a scenario where I've got funds on account index 2, address index 5:

TypeError: Cannot read properties of undefined (reading 'toString')
    at getAccountAssetsForSelectedAccount (getAccountAssetsForSelectedAccount.ts:16:1)
    at selected-account-assets.store.ts:42:1
    at sync (index.mjs:77:1)
    at index.mjs:95:1
    at Object.subscribe (index.mjs:48:1)
    at subscribe (index.mjs:55:1)
    at get_store_value (index.mjs:60:1)
    at getOutputOptions (getOutputOptions.ts:24:1)
    at claimShimmerRewardsForShimmerClaimingAccount (claimShimmerRewards.ts:67:1)
    at async claimShimmerRewardsForShimmerClaimingAccounts (claimShimmerRewards.ts:42:1)

I tried to reproduce but without success. I created this with your fund spreader:
image

But I was able to claim and the account was created successfully.

I tried to debugg this line: at getAccountAssetsForSelectedAccount (getAccountAssetsForSelectedAccount.ts:16:1) Does the error occur when it loads the dashboard?

getAssetFromPersistedAssets(COIN_TYPE[networkProtocol].toString())

Maybe it's setting the wrong network protocol for some reason?

Copy link
Member

@begonaalvarezd begonaalvarezd left a comment

Choose a reason for hiding this comment

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

Looking great 💪🏼
Just 2 comments:

  • I would flip the buttons in this screen
    image
  • "rerun" button doesnt respond, repro steps:
use the same seed in desktop & mobile, a seed that has unclaimed funds
get into the screen where your next step is just claiming, on both desktop and mobile
claim with desktop, so mobile cant claim anymore, though it knowns about the transaction
if will display an error because it cant claim twice the same funds
---- until here, all is good behavior
firefly mobile suggests "rerun", you press the button, nothing happens

image

@Tuditi Tuditi removed their request for review January 26, 2023 16:08
Copy link
Member

@begonaalvarezd begonaalvarezd left a comment

Choose a reason for hiding this comment

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

🚀

@begonaalvarezd begonaalvarezd merged commit 580ddcc into develop Jan 26, 2023
@begonaalvarezd begonaalvarezd deleted the feat-mobile/add-claiming branch January 26, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stardust Related to the Stardust Protocol type:feature Adding a new feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Add claiming success view [Task]: Add claiming rewards view [Task]: Add shimmer claiming router
3 participants