Skip to content

Commit

Permalink
Chore: remove Fortmatic, Portis and Torus (safe-global#1400)
Browse files Browse the repository at this point in the history
* Chore: remove Fortmatic, Portis and Torus

* Rm mocks
  • Loading branch information
katspaugh authored Dec 20, 2022
1 parent 976ad89 commit 4f3eb09
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 422 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
NEXT_PUBLIC_TENDERLY_ORG_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_ORG_NAME }}
NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_PROJECT_NAME }}
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL: ${{ secrets.NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL }}
NEXT_PUBLIC_FORTMATIC_KEY: ${{ secrets.NEXT_PUBLIC_FORTMATIC_KEY }}
NEXT_PUBLIC_PORTIS_KEY: ${{ secrets.NEXT_PUBLIC_PORTIS_KEY }}
NEXT_PUBLIC_WC_BRIDGE: ${{ secrets.NEXT_PUBLIC_WC_BRIDGE }}
NEXT_PUBLIC_IS_PRODUCTION: ${{ true }}

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
NEXT_PUBLIC_TENDERLY_ORG_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_ORG_NAME }}
NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_PROJECT_NAME }}
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL: ${{ secrets.NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL }}
NEXT_PUBLIC_FORTMATIC_KEY: ${{ secrets.NEXT_PUBLIC_FORTMATIC_KEY }}
NEXT_PUBLIC_PORTIS_KEY: ${{ secrets.NEXT_PUBLIC_PORTIS_KEY }}
NEXT_PUBLIC_WC_BRIDGE: ${{ secrets.NEXT_PUBLIC_WC_BRIDGE }}

- name: Configure AWS credentials
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
NEXT_PUBLIC_TENDERLY_ORG_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_ORG_NAME }}
NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ secrets.NEXT_PUBLIC_TENDERLY_PROJECT_NAME }}
NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL: ${{ secrets.NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL }}
NEXT_PUBLIC_FORTMATIC_KEY: ${{ secrets.NEXT_PUBLIC_FORTMATIC_KEY }}
NEXT_PUBLIC_PORTIS_KEY: ${{ secrets.NEXT_PUBLIC_PORTIS_KEY }}
NEXT_PUBLIC_CYPRESS_MNEMONIC: ${{ secrets.NEXT_PUBLIC_CYPRESS_MNEMONIC }}
NEXT_PUBLIC_WC_BRIDGE: ${{ secrets.NEXT_PUBLIC_WC_BRIDGE }}

Expand Down
6 changes: 0 additions & 6 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jest.mock('@web3-onboard/ledger', () => jest.fn())
jest.mock('@web3-onboard/trezor', () => jest.fn())
jest.mock('@web3-onboard/walletconnect', () => jest.fn())
jest.mock('@web3-onboard/tallyho', () => jest.fn())
jest.mock('@web3-onboard/fortmatic', () => jest.fn())
jest.mock('@web3-onboard/portis', () => jest.fn())
jest.mock('@web3-onboard/torus', () => jest.fn())

jest.mock('@web3-onboard/injected-wallets/dist/icons/metamask', () => '')
jest.mock('@web3-onboard/coinbase/dist/icon', () => '')
Expand All @@ -24,9 +21,6 @@ jest.mock('@web3-onboard/walletconnect/dist/icon', () => '')
jest.mock('@web3-onboard/trezor/dist/icon', () => '')
jest.mock('@web3-onboard/ledger/dist/icon', () => '')
jest.mock('@web3-onboard/tallyho/dist/icon', () => '')
jest.mock('@web3-onboard/fortmatic/dist/icon', () => '')
jest.mock('@web3-onboard/portis/dist/icon', () => '')
jest.mock('@web3-onboard/torus/dist/icon', () => '')

const mockOnboardState = {
chains: [],
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@
"@truffle/hdwallet-provider": "^2.0.14",
"@web3-onboard/coinbase": "^2.1.3",
"@web3-onboard/core": "2.8.5",
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/injected-wallets": "^2.3.0",
"@web3-onboard/keystone": "^2.3.2",
"@web3-onboard/ledger": "^2.3.2",
"@web3-onboard/portis": "^2.1.3",
"@web3-onboard/tallyho": "^2.0.1",
"@web3-onboard/torus": "^2.1.3",
"@web3-onboard/trezor": "^2.3.2",
"@web3-onboard/walletconnect": "^2.1.3",
"classnames": "^2.3.1",
Expand Down
6 changes: 0 additions & 6 deletions src/components/common/WalletIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import walletConnectIcon from '@web3-onboard/walletconnect/dist/icon'
import trezorIcon from '@web3-onboard/trezor/dist/icon'
import ledgerIcon from '@web3-onboard/ledger/dist/icon'
import tallyhoIcon from '@web3-onboard/tallyho/dist/icon'
import fortmaticIcon from '@web3-onboard/fortmatic/dist/icon'
import portisIcon from '@web3-onboard/portis/dist/icon'
import torusIcon from '@web3-onboard/torus/dist/icon'

import { WALLET_KEYS } from '@/hooks/wallets/wallets'
import pairingIcon from '@/services/pairing/icon'
Expand All @@ -34,9 +31,6 @@ const WALLET_ICONS: Props = {
[WALLET_KEYS.LEDGER]: ledgerIcon,
[WALLET_KEYS.PAIRING]: pairingIcon,
[WALLET_KEYS.TALLYHO]: tallyhoIcon,
[WALLET_KEYS.FORTMATIC]: fortmaticIcon,
[WALLET_KEYS.PORTIS]: portisIcon,
[WALLET_KEYS.TORUS]: torusIcon,
}

// Labels may differ from ALL_WALLET_KEYS
Expand Down
21 changes: 1 addition & 20 deletions src/hooks/wallets/wallets.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
CYPRESS_MNEMONIC,
TREZOR_APP_URL,
TREZOR_EMAIL,
WC_BRIDGE,
FORTMATIC_KEY,
PORTIS_KEY,
} from '@/config/constants'
import { CYPRESS_MNEMONIC, TREZOR_APP_URL, TREZOR_EMAIL, WC_BRIDGE } from '@/config/constants'
import { type RecommendedInjectedWallets, type WalletInit } from '@web3-onboard/common/dist/types.d'
import type { ChainInfo } from '@safe-global/safe-gateway-typescript-sdk'

Expand All @@ -16,9 +9,6 @@ import ledgerModule from '@web3-onboard/ledger'
import trezorModule from '@web3-onboard/trezor'
import walletConnect from '@web3-onboard/walletconnect'
import tallyhoModule from '@web3-onboard/tallyho'
import fortmaticModule from '@web3-onboard/fortmatic'
import portisModule from '@web3-onboard/portis'
import torusModule from '@web3-onboard/torus'

import pairingModule, { PAIRING_MODULE_LABEL } from '@/services/pairing/module'
import e2eWalletModule from '@/tests/e2e-wallet'
Expand All @@ -35,9 +25,6 @@ export const enum WALLET_KEYS {
TREZOR = 'TREZOR',
WALLETCONNECT = 'WALLETCONNECT',
TALLYHO = 'TALLYHO',
FORTMATIC = 'FORTMATIC',
PORTIS = 'PORTIS',
TORUS = 'TORUS',
}

export const CGW_NAMES: { [key in WALLET_KEYS]: string | undefined } = {
Expand All @@ -49,9 +36,6 @@ export const CGW_NAMES: { [key in WALLET_KEYS]: string | undefined } = {
[WALLET_KEYS.TREZOR]: 'trezor',
[WALLET_KEYS.WALLETCONNECT]: 'walletConnect',
[WALLET_KEYS.TALLYHO]: 'tally',
[WALLET_KEYS.FORTMATIC]: 'fortmatic',
[WALLET_KEYS.PORTIS]: 'portis',
[WALLET_KEYS.TORUS]: 'torus',
}

const WALLET_MODULES: { [key in WALLET_KEYS]: () => WalletInit } = {
Expand All @@ -64,9 +48,6 @@ const WALLET_MODULES: { [key in WALLET_KEYS]: () => WalletInit } = {
[WALLET_KEYS.TALLYHO]: tallyhoModule,
[WALLET_KEYS.COINBASE]: () =>
coinbaseModule({ darkMode: !!window?.matchMedia('(prefers-color-scheme: dark)')?.matches }),
[WALLET_KEYS.FORTMATIC]: () => fortmaticModule({ apiKey: FORTMATIC_KEY }),
[WALLET_KEYS.PORTIS]: () => portisModule({ apiKey: PORTIS_KEY }),
[WALLET_KEYS.TORUS]: torusModule,
}

export const getAllWallets = (): WalletInit[] => {
Expand Down
Loading

0 comments on commit 4f3eb09

Please sign in to comment.