-
-
Notifications
You must be signed in to change notification settings - Fork 128
Wallet schema v2 #2146
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
base: wallet-refactor-migrate-vault
Are you sure you want to change the base?
Wallet schema v2 #2146
Conversation
7efb350
to
a10af10
Compare
eccc4d0
to
840bb20
Compare
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
16991000 | Triggered | Generic High Entropy Secret | f45e9f0 | docker/db/wallet-seed.sql | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
* static table WalletV2 stores which send and receive methods a wallet supports => allows multiple send and recv methods per wallet * split wallets by send and recv for easier validation of configuration instead of having both send and recv optional and rely on application logic to make sure the configuration is not invalid * wallet method tables (WalletSend..., WalletRecv...) store configuration per user wallet * use triggers to make sure that a method of a user wallet is actually supported by the wallet How to add a new wallet: * add a new row to the WalletV2 table and declare which send and recv methods it supports * if it supports a new method, add a new method table to store the configuration and set correct enum value as type
This moves existing wallets from the old schema to the new schema. However, this will create a new wallet for each old wallet even though they could possibly be merged into the same wallet since wallets support multiple send/recv methods now. This will be fixed in a later commit.
Description
based on #2092 because it's the target branch
This PR does the following:
WalletV2
which stores which send and receive methods a wallet supports=> allows multiple send and recv methods per wallet
WalletSend...
,WalletRecv...
) which store configuration per user walletHow to add a new wallet:
WalletV2
table and declare which send and recv methods it supportsTODO:
walletId
in wallet method tables so a user wallet can't have the same method twice for the same walletUserWallet
rowwalletId
foreign keys that point toUserWallet
instead ofWalletV2
touserWalletId
to avoid confusion?Additional Context
This is based on the latest discussion with @huumn how to plan further ahead with the wallet schema than to just migrate the vault in #2092.
Checklist
Are your changes backwards compatible? Please answer below:
tbd
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
tbd
For frontend changes: Tested on mobile, light and dark mode? Please answer below:
n/a
Did you introduce any new environment variables? If so, call them out explicitly here:
no