forked from tahowallet/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make default wallet injection more explicit
The initial flow `load window provider > message background script for default config > if set to default overwrite politely the window.ethereum` caused problems because window.ethereum was not present or was occupied by others libs when dApps started looking for it. Changed the strategy to overwrite window.ethereum by default and reset if tally is set not to be the default wallet explicitly by the user. Another solution would be for the background script to start the communication on connect and act accordingly, but that also has the chance for the race condition to happen. I chose the slightly more "selfish" but more robust approach here.
- Loading branch information
Gergo Nagy
committed
Mar 23, 2022
1 parent
938ed8c
commit 1243a02
Showing
3 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters