Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert Ledger module #2215

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@web3-onboard/core": "2.20.4",
"@web3-onboard/injected-wallets": "^2.10.0",
"@web3-onboard/keystone": "^2.3.7",
"@web3-onboard/ledger": "^2.5.0",
"@web3-onboard/ledger": "2.3.2",
"@web3-onboard/taho": "^2.0.5",
"@web3-onboard/trezor": "^2.4.2",
"@web3-onboard/walletconnect": "2.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/config/securityHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { CYPRESS_MNEMONIC, IS_PRODUCTION } from '@/config/constants'
export const ContentSecurityPolicy = `
default-src 'self';
connect-src 'self' *;
script-src 'self' https://www.google-analytics.com https://ssl.google-analytics.com 'unsafe-inline' https://*.getbeamer.com https://www.googletagmanager.com https://*.ingest.sentry.io https://sentry.io https://cdn.jsdelivr.net/npm/@ledgerhq/connect-kit@1 ${
script-src 'self' https://www.google-analytics.com https://ssl.google-analytics.com 'unsafe-inline' https://*.getbeamer.com https://www.googletagmanager.com https://*.ingest.sentry.io https://sentry.io ${
!IS_PRODUCTION || /* TODO: remove after moving cypress to görli and testing in staging again!! */ CYPRESS_MNEMONIC
? "'unsafe-eval'"
: ''
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/wallets/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ const WALLET_MODULES: { [key in WALLET_KEYS]: (chain: ChainInfo) => WalletInit }
[WALLET_KEYS.PAIRING]: () => pairingModule(),
[WALLET_KEYS.WALLETCONNECT]: () => walletConnectV1(),
[WALLET_KEYS.WALLETCONNECT_V2]: (chain) => walletConnectV2(chain),
[WALLET_KEYS.LEDGER]: (chain) =>
ledgerModule({ walletConnectVersion: 2, projectId: WC_PROJECT_ID, requiredChains: [parseInt(chain.chainId)] }),
[WALLET_KEYS.LEDGER]: () => ledgerModule(),
[WALLET_KEYS.TREZOR]: () => trezorModule({ appUrl: TREZOR_APP_URL, email: TREZOR_EMAIL }),
[WALLET_KEYS.KEYSTONE]: () => keystoneModule(),
[WALLET_KEYS.TAHO]: () => tahoModule(),
Expand Down
2 changes: 2 additions & 0 deletions src/services/pairing/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const pairingModule = (): WalletInit => {
this.disconnected$ = new Subject()
this.providers = {}

// @ts-expect-error - `payload` type (`ISessionStatus`) is not correctly `pipe`ed
fromEvent(this.connector, ProviderEvents.WC_SESSION_UPDATE, (error, payload) => {
if (error) {
throw error
Expand All @@ -93,6 +94,7 @@ const pairingModule = (): WalletInit => {
error: console.warn,
})

// @ts-expect-error - `this.connector` does not satisfy the event target type
fromEvent(this.connector, ProviderEvents.DISCONNECT, (error, payload) => {
if (error) {
throw error
Expand Down
5 changes: 0 additions & 5 deletions src/styles/onboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,3 @@
#kv_sdk_container + .ReactModalPortal .ReactModal__Content {
padding: 0 !important;
}

/* Ledger modal */
.ledger-ck-modal > div#ModalWrapper {
z-index: 9999999 !important;
}
Loading
Loading