Skip to content

Wallet v2 #2169

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

Draft
wants to merge 76 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c6ff371
Migrate vault entries to new schema (#2092)
ekzyis May 18, 2025
0485c2d
Wallet schema v2 (#2146)
ekzyis May 18, 2025
3725196
Add wallet-v2 TODOs
ekzyis May 18, 2025
56519e1
Update checkWallet
ekzyis May 18, 2025
0cc36d0
Wallet list
ekzyis May 18, 2025
aaf811e
Delete almost all wallet v1 code
ekzyis May 21, 2025
29ee0c2
Define protocol display name in JSON
ekzyis May 26, 2025
8833e5d
Show form per protocol
ekzyis May 26, 2025
8b793b8
Increase max-height of image in form
ekzyis May 27, 2025
441f00b
Add JSdoc for protocols, form validation
ekzyis May 27, 2025
73e09b2
Use wallet cards again
ekzyis May 27, 2025
a3ca2dd
Refactor hooks in wallet provider
ekzyis May 27, 2025
9b4e7e0
Fix PasswordInput not used
ekzyis May 27, 2025
5a5eec4
Read encrypted wallets
ekzyis May 27, 2025
4d1ff30
Decrypt wallets
ekzyis May 28, 2025
d5dba95
Rename protocolJson to protocol
ekzyis May 28, 2025
fb13748
Fix form not updated with decrypted API key
ekzyis May 30, 2025
38d6ed6
Fix wallet template forms
ekzyis May 30, 2025
5b7eac2
Fix optional shown as hint
ekzyis May 30, 2025
a1abb2a
Rename to mapUserWalletResolveTypes
ekzyis May 30, 2025
936006b
Save LNbits send and recv
ekzyis May 31, 2025
a655fbf
Move definitions to lib/wallets.json and lib/protocols
ekzyis May 31, 2025
dfeabde
Fix ProtocolWallet.updated_at not updated by trigger
ekzyis Jun 1, 2025
2453ab4
Move wallet fragments into wallets/client/fragments/
ekzyis Jun 1, 2025
49e03ba
Move wallet resolvers into wallets/server/resolvers
ekzyis Jun 1, 2025
3d9c348
Fix missing authorization check on wallet update
ekzyis Jun 1, 2025
25dd51f
Run all shared code in generic wallet update function
ekzyis Jun 1, 2025
1a910e3
Fix 'encrypt' flag not set for blink send currency
ekzyis Jun 1, 2025
8d84006
Add mutations for all protocols
ekzyis Jun 1, 2025
4d9216f
Fix macaroon validation
ekzyis Jun 1, 2025
21167b1
Fix CLN socket value not set
ekzyis Jun 2, 2025
b74250c
Add server-side schema validation
ekzyis Jun 2, 2025
750c92a
Fix JSDoc typedef for protocols
ekzyis Jun 2, 2025
bc9b60c
Don't put JSDoc into separate file
ekzyis Jun 2, 2025
d3f43dd
Create test invoices on save
ekzyis Jun 2, 2025
19368bc
Also move type resolvers into wallets/server/resolvers
ekzyis Jun 3, 2025
2414636
Fix unconfigured protocols of UserWallet not found
ekzyis Jun 3, 2025
299f64f
Fix Blink API key in wallet seed
ekzyis Jun 3, 2025
a81eed5
Test send payment on save (except LNC)
ekzyis Jun 3, 2025
fe47873
Check if window.webln is defined on save
ekzyis Jun 4, 2025
9a2cd36
Create new wallets from templates
ekzyis Jun 4, 2025
74f75fb
Separate protocols in wallets/lib into individual files
ekzyis Jun 4, 2025
bf109dd
Use justify-content-start for protocol tabs
ekzyis Jun 4, 2025
d384654
Add LNC to client protocols
ekzyis Jun 5, 2025
7ca4dcc
Only return wallets from useWallets
ekzyis Jun 5, 2025
ea3e41f
Query decrypted wallets
ekzyis Jun 5, 2025
9cd2648
Payments with new wallets
ekzyis Jun 5, 2025
2a48cdc
More wallet logos
ekzyis Jun 5, 2025
31ebc49
Fix TypeError in useIndexedDB
ekzyis Jun 5, 2025
7f9bf15
Add protocol attach docs
ekzyis Jun 6, 2025
d44c888
Fix undefined useWalletRecvPrompt import
ekzyis Jun 6, 2025
e886474
Remove outdated TODOs
ekzyis Jun 6, 2025
0d3b60f
First successful zap to new wallets
ekzyis Jun 6, 2025
3bf15fa
Fix walletLogger imports
ekzyis Jun 6, 2025
d30caca
Fix sequences
ekzyis Jun 6, 2025
3a1b362
Rename ProtocolWallet columns
ekzyis Jun 6, 2025
250ec74
Remove more outdated TODOs
ekzyis Jun 7, 2025
0bb4b07
Update wallet indicator
ekzyis Jun 7, 2025
ab1be82
Fix page reset on route change
ekzyis Jun 7, 2025
89ef0c0
Refactor __typename checks into functions
ekzyis Jun 7, 2025
f7ea70e
Refactor protocol selection into own hook
ekzyis Jun 7, 2025
fca59b9
Add button to detach protocol
ekzyis Jun 7, 2025
6418765
Refetch wallet on save and detach
ekzyis Jun 8, 2025
7757508
Refetch wallets on change
ekzyis Jun 8, 2025
b2d9942
Always show all templates
ekzyis Jun 8, 2025
58b2ace
Refactor WalletLink component
ekzyis Jun 8, 2025
ee81224
Also put wallet into forms context
ekzyis Jun 8, 2025
010f167
Remove outdated TODOs
ekzyis Jun 10, 2025
a9a1678
Use useMemo in wallets hooks
ekzyis Jun 11, 2025
65f73de
Passphrase modals
ekzyis Jun 8, 2025
0ae6182
Fix protocol missing as callback dependency
ekzyis Jun 11, 2025
b354ce2
Encrypt wallets with new key on passphrase export
ekzyis Jun 11, 2025
c96ea51
Update 'unlock wallets' text
ekzyis Jun 11, 2025
d102d11
Rename wallet mutation hooks
ekzyis Jun 11, 2025
f52cad3
Remove 'removeWallet' mutation
ekzyis Jun 11, 2025
7c6b2c1
Passphrase reset
ekzyis Jun 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ docker-compose.*.yml
*.sql
!/prisma/migrations/*/*.sql
!/docker/db/seed.sql
!/docker/db/wallet-seed.sql

# nostr wallet connect
scripts/nwc-keys.json
Expand Down
4 changes: 2 additions & 2 deletions api/paidAction/zap.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ export async function getInvoiceablePeer ({ id, sats, hasSendWallet }, { models,
return null
}

const wallets = await getInvoiceableWallets(item.userId, { models })
const protocols = await getInvoiceableWallets(item.userId, { models })

// request peer invoice if they have an attached wallet and have not forwarded the item
// and the receiver doesn't want to receive credits
if (wallets.length > 0 &&
if (protocols.length > 0 &&
item.itemForwards.length === 0 &&
sats >= item.user.receiveCreditsBelowSats) {
return item.userId
Expand Down
6 changes: 3 additions & 3 deletions api/resolvers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import user from './user'
import message from './message'
import item from './item'
import wallet from './wallet'
import userWallet from '@/wallets/server/resolvers'
import lnurl from './lnurl'
import notifications from './notifications'
import invite from './invite'
Expand All @@ -19,7 +20,6 @@ import chainFee from './chainFee'
import { GraphQLScalarType, Kind } from 'graphql'
import { createIntScalar } from 'graphql-scalar'
import paidAction from './paidAction'
import vault from './vault'

const date = new GraphQLScalarType({
name: 'Date',
Expand Down Expand Up @@ -54,6 +54,6 @@ const limit = createIntScalar({
maximum: 1000
})

export default [user, item, message, wallet, lnurl, notifications, invite, sub,
export default [user, item, message, wallet, userWallet, lnurl, notifications, invite, sub,
upload, search, growth, rewards, referrals, price, admin, blockHeight, chainFee,
{ JSONObject }, { Date: date }, { Limit: limit }, paidAction, vault]
{ JSONObject }, { Date: date }, { Limit: limit }, paidAction]
53 changes: 0 additions & 53 deletions api/resolvers/vault.js

This file was deleted.

Loading