diff --git a/services/gunDB/contact-api/getters/index.js b/services/gunDB/contact-api/getters/index.js index d5e198b6..2f2d9944 100644 --- a/services/gunDB/contact-api/getters/index.js +++ b/services/gunDB/contact-api/getters/index.js @@ -3,19 +3,17 @@ */ const Key = require('../key') -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() - ) + const currAddr = await require('../../Mediator') + .getGun() + .user(pub) + .get(Key.CURRENT_ORDER_ADDRESS) + .specialThen() if (typeof currAddr !== 'string') { throw new TypeError('Expected user.currentOrderAddress to be an string')