From d4ed5e03556e197d0c7a70713b506815065728d0 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Wed, 29 Jan 2020 19:42:11 -0400 Subject: [PATCH] use getter --- services/gunDB/contact-api/events/onReceivedReqs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/gunDB/contact-api/events/onReceivedReqs.js b/services/gunDB/contact-api/events/onReceivedReqs.js index 1136b19d..152f272b 100644 --- a/services/gunDB/contact-api/events/onReceivedReqs.js +++ b/services/gunDB/contact-api/events/onReceivedReqs.js @@ -29,9 +29,6 @@ let pubToAvatar = {} /** @type {Streams.DisplayNames} */ let pubToDn = {} -/** @type {Streams.Incomings} */ -let pubToIncoming = {} - /** @type {SimpleReceivedRequest[]} */ let currentReqs = [] @@ -44,6 +41,7 @@ let currentNode = {} const react = () => { /** @type {SimpleReceivedRequest[]} */ const finalReqs = [] + const pubToIncoming = Streams.getPubToIncoming() for (const [id, req] of Object.entries(currentNode)) { const notAccepted = typeof pubToIncoming[req.from] === 'undefined'