Skip to content

Commit

Permalink
removed unnecessary async
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Mar 17, 2023
1 parent 262d389 commit a56aca0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/helpers/masa.ts
Expand Up @@ -21,7 +21,7 @@ export const getWeb3Provider = (): providers.Web3Provider | undefined => {
return;
};

export const createNewMasa = async ({
export const createNewMasa = ({
signer,
environmentName,
networkName = 'unknown',
Expand All @@ -33,7 +33,7 @@ export const createNewMasa = async ({
networkName?: NetworkName;
arweaveConfig?: ArweaveConfig;
verbose: boolean;
}): Promise<Masa | undefined> => {
}): Masa | undefined => {
const newSigner: ethers.Signer | null = signer
? signer
: createRandomWallet(getWeb3Provider());
Expand Down
2 changes: 1 addition & 1 deletion src/provider/masa-context-provider.tsx
Expand Up @@ -173,7 +173,7 @@ export const MasaContextProvider = ({
const loadMasa = async (): Promise<void> => {
if (!provider) return;

const masa: Masa | undefined = await createNewMasa({
const masa: Masa | undefined = createNewMasa({
signer: provider,
environmentName,
networkName: currentNetwork?.networkName,
Expand Down
2 changes: 1 addition & 1 deletion src/provider/use-metamask.ts
Expand Up @@ -159,7 +159,7 @@ export const useMetamask = ({
/**
* on network / chain changed
*/
window.ethereum?.on('chainChanged', async () => {
window.ethereum?.on('chainChanged', () => {
setProvider?.(getWeb3Provider()?.getSigner());
});
}
Expand Down

0 comments on commit a56aca0

Please sign in to comment.