From dba537e9b02eda87b7ae829c4f8766bf4f060468 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Tue, 2 Jun 2020 13:06:18 -0400 Subject: [PATCH] format --- services/gunDB/contact-api/getters.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/services/gunDB/contact-api/getters.js b/services/gunDB/contact-api/getters.js index cc1104f7..ed6d4541 100644 --- a/services/gunDB/contact-api/getters.js +++ b/services/gunDB/contact-api/getters.js @@ -1,3 +1,6 @@ +/** + * @format + */ const Key = require('./key') const Utils = require('./utils') @@ -5,8 +8,13 @@ const Utils = require('./utils') * @param {string} pub * @returns {Promise} */ -exports.currentOrderAddress = async (pub) => { - const currAddr = await Utils.tryAndWait((gun) => gun.user(pub).get(Key.CURRENT_ORDER_ADDRESS).then()) +exports.currentOrderAddress = async pub => { + const currAddr = await Utils.tryAndWait(gun => + gun + .user(pub) + .get(Key.CURRENT_ORDER_ADDRESS) + .then() + ) if (typeof currAddr !== 'string') { throw new TypeError('Expected user.currentOrderAddress to be an string') @@ -19,11 +27,14 @@ exports.currentOrderAddress = async (pub) => { * @param {string} pub * @returns {Promise} */ -exports.userToIncomingID = async (pub) => { - const incomingID = await require('../Mediator').getUser().get(Key.USER_TO_INCOMING).get(pub).then() +exports.userToIncomingID = async pub => { + const incomingID = await require('../Mediator') + .getUser() + .get(Key.USER_TO_INCOMING) + .get(pub) + .then() if (typeof incomingID === 'string') return incomingID return null - -} \ No newline at end of file +}