Skip to content

Commit

Permalink
fix: always announce eip-6963 (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKheops authored Oct 4, 2023
1 parent 91899d5 commit 6a5ce33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/extension/src/core/injectEth/injectEthereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export const injectEthereum = (sendRequest: SendRequest) => {
log.debug("Injecting talismanEth")
windowInject.talismanEth = talismanEth

// eip-6963 wallet announcement
announceProvider(talismanEth)

// also inject on window.ethereum if it is not defined
// this allows users to just disable metamask if they want to use Talisman instead
if (windowInject.ethereum === undefined) {
Expand Down Expand Up @@ -66,9 +69,6 @@ export const injectEthereum = (sendRequest: SendRequest) => {
windowInject.web3 = { currentProvider: talismanEth }

window.dispatchEvent(new Event("ethereum#initialized"))

// eip-6963 wallet announcement
announceProvider(talismanEth)
} else if (WITH_LOG_PROXY) {
windowInject.ethereum = logProxy(windowInject.ethereum)
}
Expand Down

0 comments on commit 6a5ce33

Please sign in to comment.