Skip to content

Commit

Permalink
fix: remove ledger integration because it's hacked (#3509)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored Dec 14, 2023
1 parent 97b4d0c commit cbf10a4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
OpenMetaMaskMobileOption,
InstallKeystoneOption,
KeystoneOption,
LedgerOption,
// LedgerOption,
TrezorOption,
TrustWalletOption,
WalletConnectV2Option,
Expand Down Expand Up @@ -65,7 +65,7 @@ export function ConnectWalletOptions({ tryActivation }: { tryActivation: TryActi
// const zengoOption = (!isInjectedMobileBrowser && <ZengoOption {...connectionProps} />) ?? null
const ambireOption = (!isInjectedMobileBrowser && <AmbireOption {...connectionProps} />) ?? null
const alphaOption = (!isInjectedMobileBrowser && <AlphaOption {...connectionProps} />) ?? null
const ledgerOption = (!isInjectedMobileBrowser && !isMobile && <LedgerOption {...connectionProps} />) ?? null
// const ledgerOption = (!isInjectedMobileBrowser && !isMobile && <LedgerOption {...connectionProps} />) ?? null
const trezorOption = (!isInjectedMobileBrowser && !isMobile && <TrezorOption {...connectionProps} />) ?? null
const keystoneOption =
(showKeystone && <KeystoneOption {...connectionProps} />) || (!isMobile && <InstallKeystoneOption />)
Expand All @@ -79,7 +79,7 @@ export function ConnectWalletOptions({ tryActivation }: { tryActivation: TryActi
{injectedOption}
{walletConnectionV2Option}
{coinbaseWalletOption}
{ledgerOption}
{/*{ledgerOption}*/}
{trezorOption}
{/*{zengoOption}*/}
{ambireOption}
Expand Down
2 changes: 1 addition & 1 deletion libs/wallet/src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export enum ConnectionType {
ALPHA = 'ALPHA',
TALLY = 'TALLY',
TRUST = 'TRUST',
LEDGER = 'LEDGER',
// LEDGER = 'LEDGER',
KEYSTONE = 'KEYSTONE',
TREZOR = 'TREZOR',
}
Expand Down
4 changes: 2 additions & 2 deletions libs/wallet/src/api/utils/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const connectionTypeToName: Record<ConnectionType, string> = {
[ConnectionType.ALPHA]: 'Alpha',
[ConnectionType.TALLY]: 'Tally',
[ConnectionType.TRUST]: 'Trust',
[ConnectionType.LEDGER]: 'Ledger',
// [ConnectionType.LEDGER]: 'Ledger',
[ConnectionType.KEYSTONE]: 'Keystone',
[ConnectionType.TREZOR]: 'Trezor',
}
Expand All @@ -37,7 +37,7 @@ const connectionTypeToIcon: Record<ConnectionType, 'Identicon' | string> = {
[ConnectionType.COINBASE_WALLET]: CoinbaseWalletIcon,
[ConnectionType.TRUST]: TrustIcon,
[ConnectionType.TALLY]: TallyIcon,
[ConnectionType.LEDGER]: LedgerIcon,
// [ConnectionType.LEDGER]: LedgerIcon,
[ConnectionType.TREZOR]: TrezorIcon,
[ConnectionType.KEYSTONE]: KeystoneImage,
[ConnectionType.WALLET_CONNECT_V2]: WalletConnectIcon,
Expand Down
2 changes: 1 addition & 1 deletion libs/wallet/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export {
} from './web3-react/connection/injected'

export { InstallKeystoneOption, KeystoneOption } from './web3-react/connection/keystone'
export { LedgerOption } from './web3-react/connection/ledger'
// export { LedgerOption } from './web3-react/connection/ledger'
export { TrezorOption } from './web3-react/connection/trezor'
export { TrustWalletOption } from './web3-react/connection/trust'
export { WalletConnectV2Option } from './web3-react/connection/walletConnectV2'
Expand Down
4 changes: 2 additions & 2 deletions libs/wallet/src/web3-react/utils/getWeb3ReactConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { coinbaseWalletConnection } from '../connection/coinbase'
import { injectedConnection } from '../connection/injected'
import { injectedWidgetConnection } from '../connection/injectedWidget'
import { keystoneConnection } from '../connection/keystone'
import { ledgerConnection } from '../connection/ledger'
// import { ledgerConnection } from '../connection/ledger'
import { networkConnection } from '../connection/network'
import { gnosisSafeConnection } from '../connection/safe'
import { tallyWalletConnection } from '../connection/tally'
Expand All @@ -25,7 +25,7 @@ const connectionTypeToConnection: Record<ConnectionType, Web3ReactConnection> =
[ConnectionType.ALPHA]: walletConnectConnectionV2,
[ConnectionType.TALLY]: tallyWalletConnection,
[ConnectionType.TRUST]: trustWalletConnection,
[ConnectionType.LEDGER]: ledgerConnection,
// [ConnectionType.LEDGER]: ledgerConnection,
[ConnectionType.KEYSTONE]: keystoneConnection,
[ConnectionType.INJECTED_WIDGET]: injectedWidgetConnection,
[ConnectionType.TREZOR]: trezorConnection,
Expand Down
2 changes: 1 addition & 1 deletion libs/wallet/src/web3-react/utils/isChainAllowed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const allowedChainsByWallet: Record<ConnectionType, SupportedChainId[]> = {
[ConnectionType.GNOSIS_SAFE]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.TALLY]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.TRUST]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.LEDGER]: ALL_SUPPORTED_CHAIN_IDS,
// [ConnectionType.LEDGER]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.TREZOR]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.KEYSTONE]: ALL_SUPPORTED_CHAIN_IDS,
[ConnectionType.ALPHA]: [],
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"@ethvault/iframe-provider": "^0.1.10",
"@fontsource/ibm-plex-mono": "^4.5.1",
"@fontsource/inter": "^4.5.1",
"@ledgerhq/connect-kit-loader": "^1.0.2",
"@lingui/cli": "^4.3.0",
"@lingui/core": "^4.3.0",
"@lingui/macro": "^4.3.0",
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3103,11 +3103,6 @@
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==

"@ledgerhq/connect-kit-loader@^1.0.2":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.0.tgz#10343b78ef13436818bf3453568a559c0eeb9d48"
integrity sha512-HUy12FEczoWY2FPubnsm1uOA8tkVWc0j90i47suThV3C9NL2xx69ZAIEU3Ytzs2bwLek9S1Q2S1VQJvA+3Ygkg==

"@ledgerhq/connect-kit-loader@^1.1.0":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.2.tgz#d550e3c1f046e4c796f32a75324b03606b7e226a"
Expand Down

2 comments on commit cbf10a4

@vercel
Copy link

@vercel vercel bot commented on cbf10a4 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cbf10a4 Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cosmos – ./

cowswap-seven.vercel.app
cosmos-cowswap.vercel.app
cosmos-git-main-cowswap.vercel.app
cosmos.cow.fi

Please sign in to comment.