Update instructions to add new wallet (#2352)
This commit is contained in:
parent
2fa2f0baea
commit
5f7d0ead1d
@ -2,11 +2,21 @@
|
|||||||
|
|
||||||
## How to add a new wallet
|
## How to add a new wallet
|
||||||
|
|
||||||
**1. Insert a new row to the `WalletTemplate` table with which protocols it supports**
|
**1. Update prisma.schema**
|
||||||
|
|
||||||
Example:
|
- add enum value to `WalletName` enum
|
||||||
|
- run `npx prisma migrate dev --create-only`
|
||||||
|
|
||||||
|
**2. Update migration file**
|
||||||
|
|
||||||
|
- append `COMMIT` to the `ALTER TYPE` statement in the migration
|
||||||
|
- insert new row into `ẀalletTemplate`
|
||||||
|
- run `npx prisma migrate dev`
|
||||||
|
|
||||||
|
Example migration:
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
ALTER TYPE "WalletName" ADD VALUE 'PHOENIX'; COMMIT;
|
||||||
INSERT INTO "WalletTemplate" (name, "sendProtocols", "recvProtocols")
|
INSERT INTO "WalletTemplate" (name, "sendProtocols", "recvProtocols")
|
||||||
VALUES (
|
VALUES (
|
||||||
'PHOENIX',
|
'PHOENIX',
|
||||||
@ -15,7 +25,7 @@ VALUES (
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
**2. Customize how the wallet looks on the client via [wallets/lib/wallets.json](/wallets/lib/wallets.json)**
|
**3. Customize how the wallet looks on the client via [wallets/lib/wallets.json](/wallets/lib/wallets.json)**
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -26,6 +36,7 @@ Example:
|
|||||||
// name to show in client
|
// name to show in client
|
||||||
"displayName": "Phoenix",
|
"displayName": "Phoenix",
|
||||||
// image to show in client
|
// image to show in client
|
||||||
|
// (dark mode will use /path/to/image-dark.png)
|
||||||
"image": "/path/to/image.png",
|
"image": "/path/to/image.png",
|
||||||
// url (planned) to show in client
|
// url (planned) to show in client
|
||||||
"url": "https://phoenix.acinq.co/"
|
"url": "https://phoenix.acinq.co/"
|
||||||
@ -36,7 +47,6 @@ _If the wallet supports a lightning address and the domain is different than the
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"templateId": 23,
|
|
||||||
"name": "ZEUS",
|
"name": "ZEUS",
|
||||||
"displayName": "Zeus",
|
"displayName": "Zeus",
|
||||||
"image": "/wallets/zeus.svg",
|
"image": "/wallets/zeus.svg",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user