From 38bf829af12f191ec28957869d5b482bc567e02c Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 22 Feb 2021 13:09:05 -0400 Subject: [PATCH] write coordinate before anything else --- services/gunDB/contact-api/jobs/onOrders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/gunDB/contact-api/jobs/onOrders.js b/services/gunDB/contact-api/jobs/onOrders.js index 08eb4e5c..8496cdfe 100644 --- a/services/gunDB/contact-api/jobs/onOrders.js +++ b/services/gunDB/contact-api/jobs/onOrders.js @@ -221,6 +221,7 @@ const listenerForAddr = (addr, SEA) => async (order, orderID) => { */ const onData = invoice => { if (invoice.settled) { + writeCoordinate(invoice.r_hash.toString(), coord) if (order.targetType === 'tip') { getUser() .get('postToTipCount') @@ -229,7 +230,6 @@ const listenerForAddr = (addr, SEA) => async (order, orderID) => { .set(null) // each item in the set is a tip } - writeCoordinate(invoice.r_hash.toString(), coord) stream.off() } }