Skip to content

Commit

Permalink
fix(wallet): not use Optimism hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Jan 21, 2025
1 parent 7ef2e15 commit 4e759e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions features/wsteth/shared/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export const Wallet = ({ isUnwrapMode }: WrapWalletProps) => {
const isLedgerLive = useIsLedgerLive();
const { isLedger: isLedgerHardware } = useConnectorInfo();
const { featureFlags } = useConfig().externalConfig;
const { isL2 } = useDappStatus();
const { isChainIdOnL2 } = useDappStatus();

const isLedgerLiveOptimism =
!featureFlags.ledgerLiveL2 && isLedgerLive && isL2;
!featureFlags.ledgerLiveL2 && isLedgerLive && isChainIdOnL2;

const isLedgerHardwareOptimism = isLedgerHardware && isL2;
const isLedgerHardwareOptimism = isLedgerHardware && isChainIdOnL2;

if (isLedgerLiveOptimism || isLedgerHardwareOptimism) {
const error = `Optimism is currently not supported in ${isLedgerLiveOptimism ? 'Ledger Live' : 'Ledger Hardware'}.`;
Expand Down

0 comments on commit 4e759e1

Please sign in to comment.