Skip to content

Commit a721d18

Browse files
authored
Merge pull request #2196 from oasisprotocol/lw/rm-transak
Remove Transak Fiat on-ramp
2 parents fff6408 + e6ff557 commit a721d18

File tree

31 files changed

+13
-601
lines changed

31 files changed

+13
-601
lines changed

.changelog/2196.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove Transak Fiat on-ramp

.env

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ REACT_APP_E2E_TEST=1
88
REACT_APP_META_CSP=
99
EXTENSION_CSP=
1010
REACT_APP_BACKEND=nexus
11-
REACT_APP_TRANSAK_URL=https://global-stg.transak.com
12-
# Our staging API key from transak dashboard
13-
REACT_APP_TRANSAK_PARTNER_ID=3566e9e3-d3b7-493c-a33e-91d33c5c32cb
1411

1512
REACT_APP_PRODUCTION_URLS="https://wallet.oasis.io, https://wallet.prd.oasis.io"
1613
REACT_APP_STAGING_URLS=https://wallet.stg.oasis.io

.env.production

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ REACT_APP_BUILD_VERSION=
55
REACT_APP_LOCALNET=
66
REACT_APP_E2E_TEST=
77

8-
REACT_APP_TRANSAK_URL=https://global.transak.com
9-
REACT_APP_TRANSAK_PARTNER_ID=4b66a274-d663-42a8-a495-e1f0e88ce023
10-
118
REACT_APP_PRODUCTION_URLS="https://wallet.oasis.io, https://wallet.prd.oasis.io"
129
REACT_APP_STAGING_URLS=https://wallet.stg.oasis.io

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
- Send ROSE tokens between Consensus accounts
4848
- Stake/Debond ROSE tokens
4949
- Deposit and withdraw from ParaTimes (Sapphire, Emerald, Cipher)
50-
- Purchase ROSE using [Transak On-Ramp]
5150

5251
### Accessibility
5352

@@ -231,4 +230,3 @@ Adding a new language:
231230
[codecov-link]: https://codecov.io/gh/oasisprotocol/oasis-wallet-web
232231
[BIP-0039]: https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
233232
[Ledger]: https://ledger.com/
234-
[Transak On-Ramp]: https://transak.com/

internals/getSecurityHeaders.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ const getCsp = ({ isExtension, isDev }) =>
6464
frame-ancestors
6565
${isExtension ? dappFrameAncestors : `'self'`};
6666
frame-src
67-
'self'
68-
https://global.transak.com
69-
https://global-stg.transak.com;
67+
'self';
7068
img-src 'self' data: https:;
7169
base-uri 'self';
7270
manifest-src 'self';
@@ -81,32 +79,32 @@ const getCsp = ({ isExtension, isDev }) =>
8179
// Generated with https://www.permissionspolicy.com/
8280
const getPermissionsPolicy = () =>
8381
`
84-
accelerometer=*,
85-
ambient-light-sensor=*,
82+
accelerometer=(),
83+
ambient-light-sensor=(),
8684
autoplay=(),
8785
bluetooth=(self),
88-
camera=*,
86+
camera=(),
8987
cross-origin-isolated=(),
9088
display-capture=(),
9189
document-domain=(self),
92-
encrypted-media=*,
90+
encrypted-media=(),
9391
execution-while-not-rendered=(),
9492
execution-while-out-of-viewport=(),
95-
fullscreen=(self "https://global.transak.com" "https://global-stg.transak.com"),
93+
fullscreen=(self),
9694
geolocation=(),
97-
gyroscope=*,
95+
gyroscope=(),
9896
keyboard-map=(),
99-
magnetometer=*,
100-
microphone=*,
97+
magnetometer=(),
98+
microphone=(),
10199
midi=(),
102100
navigation-override=(),
103-
payment=("https://global.transak.com" "https://global-stg.transak.com"),
101+
payment=(),
104102
picture-in-picture=(),
105-
publickey-credentials-get=*,
103+
publickey-credentials-get=(),
106104
screen-wake-lock=(),
107105
sync-xhr=(),
108106
usb=(self),
109-
web-share=*,
107+
web-share=(),
110108
xr-spatial-tracking=()
111109
`
112110
.trim()

playwright/tests/extension.spec.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,6 @@ test.describe('The extension popup should load', () => {
4040
await expect(popup.getByText('error').or(popup.getByText('fail'))).toBeHidden()
4141
})
4242

43-
/**
44-
* Extension should be able to show embedded Transak, but we currently link to
45-
* it instead. Ext popup is too small and loses all progress when it closes.
46-
*/
47-
test('Transak can not be embedded in extension', async ({ page, extensionPopupURL }) => {
48-
test.fail()
49-
50-
/* TODO: reenable when transak throws only a few errors
51-
await expectNoErrorsInConsole(page, {
52-
ignoreError: msg => {
53-
// Odd errors inside Transak
54-
if (msg.text().includes('responded with a status of 403')) return true
55-
if (msg.text().includes('`sessionKey` is a required property')) return true
56-
if (msg.text().includes('[Report Only]')) return true
57-
if (msg.text().includes('script-src https://*.transak.com https://*.google.com')) return true
58-
},
59-
})
60-
*/
61-
await page.goto(`${extensionPopupURL}/`)
62-
await page.evaluate(() => {
63-
const iframe = document.createElement('iframe')
64-
iframe.src = 'https://global.transak.com'
65-
document.body.appendChild(iframe)
66-
})
67-
await page.locator('iframe').scrollIntoViewIfNeeded()
68-
await expect(page.frameLocator('iframe')!.getByAltText('Powered by Transak')).toBeVisible()
69-
})
70-
7143
test('recover from fatal errors', async ({ extensionPopupURL, context }) => {
7244
{
7345
const page = await context.newPage()

playwright/tests/fiat.spec.ts

Lines changed: 0 additions & 135 deletions
This file was deleted.

playwright/utils/mockApi.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ export async function mockApi(context: BrowserContext | Page, balance: number |
112112
body: 'AAAAAAA=gAAAAB5ncnBjLXN0YXR1czowDQpncnBjLW1lc3NhZ2U6DQo=',
113113
})
114114
})
115-
116-
// Inside Transak iframe
117-
await context.route('https://sentry.io/**', route => route.fulfill({ body: '' }))
118-
await context.route('https://cdn.segment.com/**', route => route.fulfill({ body: '' }))
119-
await context.route('https://api.segment.io/**', route => route.fulfill({ body: '' }))
120-
await context.route('https://api.sardine.ai/**', route => route.fulfill({ body: '' }))
121115
}
122116

123117
export async function mockApiMoreData(context: BrowserContext | Page) {

src/app/components/MobileFooterNavigation/__tests__/index.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,5 @@ describe('<MobileFooterNavigation />', () => {
4141

4242
const paraTimesLink = screen.getByRole('link', { name: /menu.paraTimes/ })
4343
expect(paraTimesLink).toHaveAttribute('href', '/account/dummy/paratimes')
44-
45-
const buyLink = screen.getByRole('link', { name: /menu.fiatOnramp-mobile/ })
46-
expect(buyLink).toHaveAttribute('href', '/account/dummy/fiat')
4744
})
4845
})

src/app/components/MobileFooterNavigation/index.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ import { Text } from 'grommet/es6/components/Text'
66
import { LineChart } from 'grommet-icons/es6/icons/LineChart'
77
import { Inherit } from 'grommet-icons/es6/icons/Inherit'
88
import { MuiWalletIcon } from '../../../styles/theme/icons/mui-icons/MuiWalletIcon'
9-
import { CreditCard } from 'grommet-icons/es6/icons/CreditCard'
109
import styled from 'styled-components'
1110
import { normalizeColor } from 'grommet/es6/utils'
1211
import { NavLink } from 'react-router-dom'
1312
import { selectAddress } from 'app/state/wallet/selectors'
1413
import { useParaTimesNavigation } from 'app/pages/ParaTimesPage/useParaTimesNavigation'
15-
import { IS_FIAT_ONRAMP_ENABLED } from '../../pages/FiatOnrampPage/isEnabled'
1614
import { mobileFooterNavigationHeight } from '../../../styles/theme/elementSizes'
1715
// eslint-disable-next-line no-restricted-imports
1816
import type { Icon } from 'grommet-icons/es6/icons'
@@ -72,15 +70,6 @@ export const MobileFooterNavigation = () => {
7270
Icon: Inherit,
7371
to: getParaTimesRoutePath(address!),
7472
},
75-
...(IS_FIAT_ONRAMP_ENABLED
76-
? [
77-
{
78-
label: t('menu.fiatOnramp-mobile', 'Buy'),
79-
Icon: CreditCard,
80-
to: `/account/${address}/fiat`,
81-
},
82-
]
83-
: []),
8473
]
8574
return menuItems
8675
}, [address, getParaTimesRoutePath, paraTimesRouteLabel, t])

0 commit comments

Comments
 (0)