From bf2f43ca6e436af1e9a0eed4bee307fd57466134 Mon Sep 17 00:00:00 2001 From: plondon Date: Fri, 3 Nov 2017 08:32:19 -0400 Subject: [PATCH] feat(External): return partner name from hasExchangeAccount --- src/external.js | 6 +++--- tests/external.spec.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/external.js b/src/external.js index 37303fc73..8b7cf08d7 100644 --- a/src/external.js +++ b/src/external.js @@ -72,9 +72,9 @@ Object.defineProperties(External.prototype, { 'hasExchangeAccount': { configurable: false, get: function () { - return (this._coinify && this._coinify.hasAccount) || - (this._sfox && this._sfox.hasAccount) || - (this._unocoin && this._unocoin.hasAccount) || false; + return (this._coinify && this._coinify.hasAccount && 'coinify') || + (this._unocoin && this._unocoin.hasAccount && 'unocoin') || + (this._sfox && this._sfox.hasAccount && 'sfox') || false; } } }); diff --git a/tests/external.spec.js b/tests/external.spec.js index 248d995ab..d9b2b2eef 100644 --- a/tests/external.spec.js +++ b/tests/external.spec.js @@ -293,10 +293,10 @@ describe('External', () => { it('hasExchangeAccount', () => { expect(e.hasExchangeAccount).toEqual(false); e._coinify.hasAccount = true; - expect(e.hasExchangeAccount).toEqual(true); + expect(e.hasExchangeAccount).toEqual('coinify'); e._coinify.hasAccount = false; e._sfox.hasAccount = true; - expect(e.hasExchangeAccount).toEqual(true); + expect(e.hasExchangeAccount).toEqual('sfox'); }); }); });