Update instructions to add new wallet (#2352)

This commit is contained in:
ekzyis 2025-07-29 17:59:02 +02:00 committed by GitHub
parent 2fa2f0baea
commit 5f7d0ead1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,11 +2,21 @@
## 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
ALTER TYPE "WalletName" ADD VALUE 'PHOENIX'; COMMIT;
INSERT INTO "WalletTemplate" (name, "sendProtocols", "recvProtocols")
VALUES (
'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:
@ -26,6 +36,7 @@ Example:
// name to show in client
"displayName": "Phoenix",
// image to show in client
// (dark mode will use /path/to/image-dark.png)
"image": "/path/to/image.png",
// url (planned) to show in client
"url": "https://phoenix.acinq.co/"
@ -36,7 +47,6 @@ _If the wallet supports a lightning address and the domain is different than the
```json
{
"templateId": 23,
"name": "ZEUS",
"displayName": "Zeus",
"image": "/wallets/zeus.svg",