From 7fc89a63f20d6612257b997941c4758d278f7abc Mon Sep 17 00:00:00 2001 From: hatim boufnichel Date: Wed, 30 Dec 2020 19:30:44 +0100 Subject: [PATCH] update with payer too --- services/gunDB/contact-api/actions.js | 9 +++++++++ services/gunDB/contact-api/jobs/onOrders.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/services/gunDB/contact-api/actions.js b/services/gunDB/contact-api/actions.js index f784cfe5..8c059238 100644 --- a/services/gunDB/contact-api/actions.js +++ b/services/gunDB/contact-api/actions.js @@ -1074,6 +1074,15 @@ const sendSpontaneousPayment = async ( payment_request: orderResponse.response }) + const coordinate = 'lnPub + invoiceIndex + payment hash(?)' //.... + const orderData = { + someInfo: 'info ' + } + getUser() + .get('orders') + .get(coordinate) + .set(orderData) + return payment } catch (e) { logger.error('Error inside sendPayment()') diff --git a/services/gunDB/contact-api/jobs/onOrders.js b/services/gunDB/contact-api/jobs/onOrders.js index 1d46cc5b..5bacd961 100644 --- a/services/gunDB/contact-api/jobs/onOrders.js +++ b/services/gunDB/contact-api/jobs/onOrders.js @@ -267,7 +267,7 @@ const listenerForAddr = (addr, SEA) => async (order, orderID) => { getUser() .get('orders') .get(coordinate) - .set(orderData) // each item in the set is a tip + .set(orderData) } stream.on('data', invoiceSubCb)