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: Seed wallet backend with default account #1101

Merged
merged 21 commits into from
Feb 21, 2024

Conversation

domin191013
Copy link
Contributor

@github-actions github-actions bot added package: wallet/backend Wallet backend implementations type: source Source changes labels Jan 27, 2024
@domin191013 domin191013 self-assigned this Jan 27, 2024
@domin191013 domin191013 requested a review from Tymmmy February 1, 2024 21:37
@Tymmmy
Copy link
Contributor

Tymmmy commented Feb 2, 2024

  • I tried to go directly to localhost/boutique and shop around. I had an 'Invalid payment pointer' error. Details in docker boutique-backend: 'Could not fetch payment pointer "-backend/d839fdd7".' This means that the Private key and key id is not associated with boutique PP correctly. We somehow need to seed the values from docker.compose to the DB as well, so boutique can use them?
  • Also, at least for the 'boutique@email.com' user I would like to not have KYC every time I redeploy Testnet. I want that user to be ready to go with everything. You can add a name 'Boutique Shop' for example as default. Maybe it would be good even for the 'dev@email.com' user to have the same, no KYC, and name 'Dev Testnet' for example. This is to make everything as automatic as possible.
  • If the boutique PP already has Developer keys generated and correctly seeded into DB, then also the Settings page Developer keys for the PP should be updated accordingly. Now I have empty keys for the PP (should be populated with values):
    image

- Change boutique PP name
@domin191013 domin191013 requested a review from Tymmmy February 6, 2024 08:27
@Tymmmy
Copy link
Contributor

Tymmmy commented Feb 6, 2024

I saw that both accounts created, Dev & Boutique have funds in their USD accounts, 500$:
image

When we go to the Transactions page we see that there was a Fund account action done, but with 100$. Why is that difference?
image

EDIT - as many times as you redeploy localy, there is a sum of 100$ added to the previous amount. So now I am on my 6th redeploy and instead of having just 100$ in my account, I have 600$. Can we fix this? :)

@Tymmmy
Copy link
Contributor

Tymmmy commented Feb 6, 2024

Please also check after new deploy, we should be able to directly shop around in the boutique. We are gettings error at checkout:
image

With docker error:
2024-02-06 10:54:16 [2024-02-06 08:54:16] [error] Could not fetch payment pointer "-backend/boutique".

This means I guess 'boutique' PP is not recognized as a correct PP that is associated with Boutique, this should be the PP that receives the money after users buy. This is the cashier of boutique, and it is not working. Is it getting correct Developer keys for it?

@domin191013
Copy link
Contributor Author

I saw that both accounts created, Dev & Boutique have funds in their USD accounts, 500$: image

When we go to the Transactions page we see that there was a Fund account action done, but with 100$. Why is that difference? image

EDIT - as many times as you redeploy localy, there is a sum of 100$ added to the previous amount. So now I am on my 6th redeploy and instead of having just 100$ in my account, I have 600$. Can we fix this? :)

Well, it's because of the same wallet account for the Rapyd platform. Since we use a specific wallet for Rapyd and do not create a new one for each deployment, it causes this difference.

@Tymmmy
Copy link
Contributor

Tymmmy commented Feb 6, 2024

I saw that both accounts created, Dev & Boutique have funds in their USD accounts, 500$: image
When we go to the Transactions page we see that there was a Fund account action done, but with 100$. Why is that difference? image
EDIT - as many times as you redeploy localy, there is a sum of 100$ added to the previous amount. So now I am on my 6th redeploy and instead of having just 100$ in my account, I have 600$. Can we fix this? :)

Well, it's because of the same wallet account for the Rapyd platform. Since we use a specific wallet for Rapyd and do not create a new one for each deployment, it causes this difference.

Can we fix it somehow? To not have this inconsistency? Withdraw the money from the account before creating again?

@github-actions github-actions bot added the package: boutique/backend Boutique backend implementations label Feb 6, 2024
@domin191013
Copy link
Contributor Author

domin191013 commented Feb 6, 2024

inconsistency

Fixed, just increased the timeout amount because it received a timeout error for the first time when the user is in the creation process.

@github-actions github-actions bot removed the package: boutique/backend Boutique backend implementations label Feb 16, 2024
- Run creating default user in Dev environment
@domin191013 domin191013 merged commit 9a3cd52 into main Feb 21, 2024
9 checks passed
@domin191013 domin191013 deleted the Seed-wallet-with-default-accounts branch February 21, 2024 15:48
devcer pushed a commit to devcer/testnet that referenced this pull request Mar 13, 2024
* Seed wallet backend with default account

* - Add Boutique default account
- Remove Boutique keys from env.example

* - Fix test

* - Fix bugs
- Change boutique PP name

* - Fix bugs

* - Fix inconsistency in default account balance

* Added small fix for onboarding, now creating EUR account

* - Fix payment pointer address

* - Create wallet and boutique default user at first stage together
- optimize codes

* - Fix envs

* - Create default user at initiation of system

* - Add log at end of creation of default users
- Run creating default user in Dev environment

* - extract create user and default account in separate method

* - Change listAssets to getRafikiAsset

* - Resolve conflicts

* - Change isBoutique to name

* - Change defaultAccount to keyPair

---------

Co-authored-by: Tymmmy <117268143+Tymmmy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: wallet/backend Wallet backend implementations package: wallet/frontend Wallet frontend implementations type: source Source changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seed wallet with default accounts and payments pointer
5 participants