diff --git a/app/ledger.js b/app/ledger.js index 067e3172f60..9c8da069e13 100644 --- a/app/ledger.js +++ b/app/ledger.js @@ -988,13 +988,17 @@ var updateLedgerInfo = () => { underscore.extend(ledgerInfo, underscore.pick(info, [ 'address', 'passphrase', 'balance', 'unconfirmed', 'satoshis', 'btc', 'amount', 'currency' ])) - if ((!info.buyURLExpires) || (info.buyURLExpires > now)) ledgerInfo.buyURL = info.buyURL - if ((process.env.NODE_ENV === 'development') && (typeof process.env.ADDFUNDS_URL !== 'undefined')) { + if ((!info.buyURLExpires) || (info.buyURLExpires > now)) { + ledgerInfo.buyURL = info.buyURL + ledgerInfo.buyMaximumUSD = 6 + } + if (typeof process.env.ADDFUNDS_URL !== 'undefined') { ledgerInfo.buyURLFrame = true ledgerInfo.buyURL = process.env.ADDFUNDS_URL + '?' + querystring.stringify({ currency: ledgerInfo.currency, amount: getSetting(settings.PAYMENTS_CONTRIBUTION_AMOUNT), address: ledgerInfo.address }) + ledgerInfo.buyMaximumUSD = false } underscore.extend(ledgerInfo, ledgerInfo._internal.cache || {}) diff --git a/js/about/preferences.js b/js/about/preferences.js index dd85d8861e6..90ee92c357b 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -350,7 +350,9 @@ class BitcoinDashboard extends ImmutableComponent { return getSetting(settings.PAYMENTS_CONTRIBUTION_AMOUNT, this.props.settings) || 0 } get canUseCoinbase () { - return this.currency === 'USD' && this.amount < 6 + if (!this.props.ledgerData.get('buyMaximumUSD')) return true + + return this.currency === 'USD' && this.amount < this.props.ledgerData.get('buyMaximumUSD') } get userInAmerica () { const countryCode = this.props.ledgerData.get('countryCode')