Skip to content

Commit

Permalink
add Fearless provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Polyakov committed Mar 1, 2024
1 parent 87c6ed3 commit 15130fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/wallet/Fearless.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/utils/ethers-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ let ethereumProvider!: any;
let ethersInstance: ethersProvider | null = null;

export enum Provider {
Fearless = 'Fearless',
Metamask = 'Metamask',
SubWallet = 'SubWallet',
TrustWallet = 'TrustWallet',
Expand Down Expand Up @@ -115,6 +116,11 @@ async function useExtensionProvider(provider: Provider): Promise<string> {
case Provider.TrustWallet:
ethereumProvider = (window as any).trustwallet;
break;
case Provider.Fearless:
console.log((window as any).fearlessWallet);
console.log((window as any).fearlessWallet.provider);
ethereumProvider = (window as any).fearlessWallet;
break;
default:
throw new Error('Unknown provider');
}
Expand Down

0 comments on commit 15130fc

Please sign in to comment.