Refactor methods from blockchain to use new code structure

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR
2023-01-13 19:35:17 -03:00
parent f40db935d3
commit 6fd2120b63
11 changed files with 186 additions and 171 deletions

View File

@@ -61,6 +61,9 @@ const listenToNetworkChange = (connection: any) => {
};
const requestNetworkChange = async (network: string): Promise<boolean> => {
const etherStore = useEtherStore();
if (!etherStore.walletAddress) return true;
try {
const window_ = window as any;
await window_.ethereum.request({