fixes related to p2p zaps

This commit is contained in:
k00b 2024-10-31 18:12:55 -05:00
parent 7b4a33b354
commit 14ab51a730
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,8 @@
import gql from 'graphql-tag'
import { isServerField } from './common'
import { WALLET_FIELDS } from '@/fragments/wallet'
// for some reason, this is needed to make the import work from worker
import * as walletFragments from '@/fragments/wallet'
const { WALLET_FIELDS } = walletFragments
export function fieldToGqlArg (field) {
let arg = `${field.name}: String`

View File

@ -40,9 +40,9 @@ export async function createInvoice (userId, { msats, description, descriptionHa
msats = toPositiveNumber(msats)
for (const wallet of wallets) {
const w = walletDefs.find(w => w.walletType === wallet.def.walletType)
const w = walletDefs.find(w => w.walletType === wallet.type)
try {
if (!canReceive({ def: w, config: wallet })) {
if (!canReceive({ def: w, config: wallet.wallet })) {
continue
}