diff --git a/app/browser/api/ledger.js b/app/browser/api/ledger.js index afd2fed00d6..6145d848c6c 100644 --- a/app/browser/api/ledger.js +++ b/app/browser/api/ledger.js @@ -1589,15 +1589,6 @@ const roundtrip = (params, options, callback) => { parts = underscore.extend(underscore.pick(parts, ['protocol', 'hostname', 'port']), underscore.omit(params, ['headers', 'payload', 'timeout'])) - // TBD: let the user configure this via preferences [MTR] - if (params.useProxy) { - if (parts.hostname === 'ledger.brave.com') { - parts.hostname = 'ledger-proxy.privateinternetaccess.com' - } else if (parts.hostname === 'ledger.mercury.basicattentiontoken.org') { - parts.hostname = 'mercury-proxy.privateinternetaccess.com' - } - } - // Use alternate hostname if it's provided parts.hostname = params.altHostname || parts.hostname @@ -1642,11 +1633,6 @@ const roundtrip = (params, options, callback) => { if (err) return callback(err, response) if (Math.floor(response.statusCode / 100) !== 2) { - if (params.useProxy && response.statusCode === 403) { - params.useProxy = false - return module.exports.roundtrip(params, options, callback) - } - return callback( new Error('HTTP response ' + response.statusCode + ' for ' + params.method + ' ' + params.path), response) diff --git a/app/extensions/brave/img/private_internet_access.png b/app/extensions/brave/img/private_internet_access.png deleted file mode 100755 index ba44b176c31..00000000000 Binary files a/app/extensions/brave/img/private_internet_access.png and /dev/null differ diff --git a/app/extensions/brave/img/private_internet_access_2x.png b/app/extensions/brave/img/private_internet_access_2x.png deleted file mode 100755 index 7080fd2dad0..00000000000 Binary files a/app/extensions/brave/img/private_internet_access_2x.png and /dev/null differ diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index f4f753386b9..86ae3cfd1e0 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -244,7 +244,6 @@ paymentInProgress=Currently processing payments=Payments paymentsFAQLink.title=View the FAQ paymentsSidebarText1=Our Partners -paymentsSidebarText2=All transaction IP addresses are anonymized with technology from: paymentsSidebarText3=Brave BAT Wallets are provided through a partnership with: paymentsWelcomeLink=View the FAQ paymentsWelcomeText1=To start using Brave Payments, simply flip the switch at the top of this window. diff --git a/app/renderer/components/preferences/payment/disabledContent.js b/app/renderer/components/preferences/payment/disabledContent.js index 48e030c328e..91540e99a8c 100644 --- a/app/renderer/components/preferences/payment/disabledContent.js +++ b/app/renderer/components/preferences/payment/disabledContent.js @@ -14,8 +14,6 @@ const cx = require('../../../../../js/lib/classSet') // style const globalStyles = require('../../styles/global') const commonStyles = require('../../styles/commonStyles') -const PIA = require('../../../../extensions/brave/img/private_internet_access.png') -const PIA2 = require('../../../../extensions/brave/img/private_internet_access_2x.png') const uphold = require('../../../../extensions/brave/img/ledger/uphold_logo_small.png') const uphold2 = require('../../../../extensions/brave/img/ledger/uphold_logo_medium.png') @@ -91,8 +89,6 @@ class DisabledContent extends ImmutableComponent {
@@ -167,12 +163,6 @@ const styles = StyleSheet.create({ display: 'block' }, - disabledContent__sidebar__logo_PIA: { - backgroundImage: `-webkit-image-set(url(${PIA}) 1x, url(${PIA2}) 2x)`, - width: '195px', - height: '20px' - }, - disabledContent__sidebar__logo_uphold: { backgroundImage: `-webkit-image-set(url(${uphold}) 1x, url(${uphold2}) 2x)`, backgroundSize: 'contain', diff --git a/test/unit/app/browser/api/ledgerTest.js b/test/unit/app/browser/api/ledgerTest.js index 0d6b6bb36e0..b5f0eb32631 100644 --- a/test/unit/app/browser/api/ledgerTest.js +++ b/test/unit/app/browser/api/ledgerTest.js @@ -903,97 +903,6 @@ describe('ledger api unit tests', function () { assert.deepEqual(state.toJS(), expectedState.toJS()) }) }) - - describe('roundtrip', function () { - let requestStub - const simpleCallback = sinon.stub() - let responseCode = 200 - - before(function () { - requestStub = sinon.stub(request, 'request', (options, callback) => { - switch (responseCode) { - case 403: - callback(null, { - statusCode: 403, - headers: {}, - statusMessage: 'Your requested URL has been blocked by the URL Filter database module of {{EnterpriseName}}. The URL is listed in categories that are not allowed by your administrator at this time.', - httpVersionMajor: 1, - httpVersionMinor: 1 - }) - break - case 200: - default: - callback(null, { - statusCode: 200, - headers: {}, - statusMessage: '', - httpVersionMajor: 1, - httpVersionMinor: 1 - }, {timestamp: '6487805648321904641'}) - } - }) - }) - - after(function () { - requestStub.restore() - }) - - describe('when params.useProxy is true', function () { - let expectedOptions - before(function () { - expectedOptions = { - url: 'https://ledger-proxy.privateinternetaccess.com/v3/publisher/timestamp', - method: 'GET', - payload: undefined, - responseType: 'text', - headers: { - 'content-type': 'application/json; charset=utf-8', - 'user-agent': '' - }, - verboseP: undefined - } - requestStub.reset() - simpleCallback.reset() - ledgerApi.roundtrip({ - server: 'https://ledger.brave.com', - path: '/v3/publisher/timestamp', - useProxy: true - }, {}, simpleCallback) - }) - - it('updates URL to use proxy (ledger-proxy.privateinternetaccess.com)', function () { - assert(requestStub.withArgs(expectedOptions, sinon.match.func).called) - }) - - it('calls the callback on success', function () { - assert(simpleCallback.calledOnce) - }) - - describe('when the proxy returns a 403', function () { - before(function () { - responseCode = 403 - requestStub.reset() - ledgerApi.roundtrip({ - server: 'https://ledger.brave.com', - path: '/v3/publisher/timestamp', - useProxy: true - }, {}, simpleCallback) - }) - after(function () { - responseCode = 200 - }) - it('calls request a second time (with useProxy = false)', function () { - assert(requestStub.calledTwice) - assert(requestStub.withArgs(expectedOptions, sinon.match.func).called) - - const secondCallOptions = Object.assign({}, expectedOptions, { - url: 'https://ledger.brave.com/v3/publisher/timestamp' - }) - assert(requestStub.withArgs(secondCallOptions, sinon.match.func).called) - }) - }) - }) - }) }) describe('when timing needs to be checked', function () {