You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when we start up the mock ASE, we run a seed script. This seed script calls the Admin API to create assets, peers, wallet addresses and add liquidity where necessary. After this, the script creates mock user accounts in memory. These mock accounts are needed to properly receive and send payments between wallet addresses (since without mock accounts, the webhook handlers do not know who to debit/credit).
However, we run into an issue when we spin down the local environment, but do not clear the Rafiki database: the seed script sees that the data has been seeded already, and exits early, without creating mock user accounts. As a result, we cannot process payments, since the webhook handlers would not be able to find the corresponding accounts.
We should change the seed script, such that it checks if the assets, peers, wallet addresses, etc already exist in Rafiki. If they do, make mock accounts based on that. Otherwise, we should proceed as normal, and create missing resources in Rafiki.
The outcome of this is that if the local playground is spun down without deleting any volumes, spinning the environment back up populates the mock accounts correctly, and payments are able to be processed as usual.
Todos
Make seed script in mock ASE handle existing data OR use some database in the MASE to store account data - discuss with the team with your proposed solution
Create an issue for the documentation (we need to update the commands for the local playground to not have to specify to down volumes before we do pnpm localenv:compose up)
The text was updated successfully, but these errors were encountered:
Context
Currently, when we start up the mock ASE, we run a seed script. This seed script calls the Admin API to create assets, peers, wallet addresses and add liquidity where necessary. After this, the script creates mock user accounts in memory. These mock accounts are needed to properly receive and send payments between wallet addresses (since without mock accounts, the webhook handlers do not know who to debit/credit).
However, we run into an issue when we spin down the local environment, but do not clear the Rafiki database: the seed script sees that the data has been seeded already, and exits early, without creating mock user accounts. As a result, we cannot process payments, since the webhook handlers would not be able to find the corresponding accounts.
We should change the seed script, such that it checks if the assets, peers, wallet addresses, etc already exist in Rafiki. If they do, make mock accounts based on that. Otherwise, we should proceed as normal, and create missing resources in Rafiki.
The outcome of this is that if the local playground is spun down without deleting any volumes, spinning the environment back up populates the mock accounts correctly, and payments are able to be processed as usual.
Todos
pnpm localenv:compose up
)The text was updated successfully, but these errors were encountered: