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

rug it #4986

Merged
merged 3 commits into from
Aug 15, 2023
Merged

rug it #4986

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 src/networks/goerli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getGoerliNetworkObject = (): NetworkProperties => {

// not sure if flashbots is being used app wide vs just swaps
flashbots: false,
walletconnect: true,
walletconnect: false,
swaps: false,
nfts: false,
savings: true,
Expand Down
5 changes: 4 additions & 1 deletion src/screens/ExchangeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ export default function ExchangeModal({
accountAddress,
flashbotsEnabled,
nativeCurrency,
network,
} = useAccountSettings();

const [isAuthorizing, setIsAuthorizing] = useState(false);
Expand Down Expand Up @@ -280,7 +281,9 @@ export default function ExchangeModal({
outputCurrency?.type
);
const chainId =
inputCurrency?.type || outputCurrency?.type
network === Network.goerli
? getNetworkObj(Network.goerli).id
: inputCurrency?.type || outputCurrency?.type
? ethereumUtils.getChainIdFromType(
inputCurrency?.type ?? outputCurrency?.type
)
Expand Down
12 changes: 9 additions & 3 deletions src/screens/SendSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,15 @@ export default function SendSheet(props) {
const selectedNetwork = isNft
? selected.network
: ethereumUtils.getNetworkFromType(selected.type);
setCurrentNetwork(selectedNetwork);
provider = await getProviderForNetwork(selectedNetwork);
setCurrentProvider(provider);
if (network === Network.goerli) {
setCurrentNetwork(Network.goerli);
provider = await getProviderForNetwork(Network.goerli);
setCurrentProvider(provider);
} else {
setCurrentNetwork(selectedNetwork);
provider = await getProviderForNetwork(selectedNetwork);
setCurrentProvider(provider);
}
}
};
updateNetworkAndProvider();
Expand Down
2 changes: 1 addition & 1 deletion src/screens/WalletScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const WalletScreen: React.FC<Props> = ({ navigation, route }) => {
}, [dispatch, initializeAccountData, loadAccountData, resetAccountState]);

useEffect(() => {
const supportedNetworks = [Network.mainnet, Network.goerli];
const supportedNetworks = [Network.mainnet];
if (!supportedNetworks.includes(currentNetwork)) {
revertToMainnet();
}
Expand Down