Skip to content
This repository was archived by the owner on Jun 16, 2022. It is now read-only.

Commit 2584248

Browse files
author
bberz-groma
committed
- add logic to AccountHeaderActions to determine if dev mode is enabled
- if enabled, allow for goerli test net to exist for WalletConnect local testing.
1 parent 1d050e2 commit 2584248

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/renderer/screens/account/AccountHeaderActions.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import {
4040
SendActionDefault,
4141
SwapActionDefault,
4242
} from "./AccountActionsDefault";
43+
import useEnv from "~/renderer/hooks/useEnv";
4344

4445
const ButtonSettings: ThemedComponent<{ disabled?: boolean }> = styled(Tabbable).attrs(() => ({
4546
alignItems: "center",
@@ -87,6 +88,10 @@ type Props = {
8788
const AccountHeaderSettingsButtonComponent = ({ account, parentAccount, openModal, t }: Props) => {
8889
const currency = getAccountCurrency(account);
8990

91+
const devModeEnabled = useEnv("MANAGER_DEV_MODE");
92+
const walletConnectBaseNetorks = ["ethereum", "bsc", "polygon"];
93+
const walletConnectNetworks = devModeEnabled ? [...walletConnectBaseNetorks, "ethereum_ropsten", "ethereum_goerli"] : walletConnectBaseNetorks;
94+
9095
const onWalletConnect = useCallback(() => {
9196
setTrackingSource("account header actions");
9297
openModal("MODAL_WALLETCONNECT_PASTE_LINK", { account });
@@ -102,7 +107,7 @@ const AccountHeaderSettingsButtonComponent = ({ account, parentAccount, openModa
102107
rounded
103108
/>
104109
</Tooltip>
105-
{["ethereum", "bsc", "polygon"].includes(currency.id) ? (
110+
{walletConnectNetworks.includes(currency.id) ? (
106111
<Tooltip content={t("walletconnect.titleAccount")}>
107112
<ButtonSettings onClick={onWalletConnect}>
108113
<Box justifyContent="center">

0 commit comments

Comments
 (0)