Skip to content

Commit

Permalink
feat: browser native web3 wallet support
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Oct 21, 2024
1 parent fbce2a6 commit 0848807
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/context/Web3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ declare global {
interface Navigator {
hid: {};
}

interface Window {
ethereum?: any;
}
}

type EIP6963AnnounceProviderEvent = {
Expand Down Expand Up @@ -78,6 +82,15 @@ const Web3SignerProvider = (props: {
const [providers, setProviders] = createSignal<
Record<string, EIP6963ProviderDetail>
>({
native: {
provider: window.ethereum,
info: {
name: "Browser native",
uuid: "browser",
rdns: "browser",
disabled: window.ethereum === undefined,
},
},
ledger: {
provider: new LedgerSigner(t),
info: {
Expand Down

0 comments on commit 0848807

Please sign in to comment.