From 701f37cf8bc270db57bcd2f535876778da4fdbd3 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Thu, 8 Sep 2022 13:06:26 -0400 Subject: [PATCH] fix: only pick offer and fee from ofer response --- src/datalayer/persistance.js | 2 ++ src/models/staging/staging.model.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datalayer/persistance.js b/src/datalayer/persistance.js index 1fb71ac9..9cd26aee 100644 --- a/src/datalayer/persistance.js +++ b/src/datalayer/persistance.js @@ -552,6 +552,8 @@ const verifyOffer = async (offer) => { const data = JSON.parse(response); + console.log(data); + if (data.success) { return true; } diff --git a/src/models/staging/staging.model.js b/src/models/staging/staging.model.js index 0cac7cf6..e75ac493 100644 --- a/src/models/staging/staging.model.js +++ b/src/models/staging/staging.model.js @@ -223,7 +223,7 @@ class Staging extends Model { metaValue: offerResponse.offer.trade_id, }); - return { offer: offerResponse.offer }; + return _.pick('offer', 'fee'); } catch (error) { throw new Error(error.message); }