write coordinate before anything else

This commit is contained in:
Daniel Lugo 2021-02-22 13:09:05 -04:00
parent fc2821f78c
commit 38bf829af1

View file

@ -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()
}
}