From 14ab51a730ae7212fe4f6002c57b305203afaf60 Mon Sep 17 00:00:00 2001 From: k00b Date: Thu, 31 Oct 2024 18:12:55 -0500 Subject: [PATCH] fixes related to p2p zaps --- wallets/graphql.js | 4 +++- wallets/server.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wallets/graphql.js b/wallets/graphql.js index b39b6ebd..d46c86f4 100644 --- a/wallets/graphql.js +++ b/wallets/graphql.js @@ -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` diff --git a/wallets/server.js b/wallets/server.js index 26894041..b57c55ba 100644 --- a/wallets/server.js +++ b/wallets/server.js @@ -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 }