-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selected network per origin #17986
Selected network per origin #17986
Commits on Apr 19, 2023
-
Muli-chain refactoring for tx components
All of the tx related components now requires `chain_id` parameter when calling its API. This is to insure we can track txs among multiple chain id for a coin type and also use the correct network url when sending out requests. Since we no longer depends on getting selected chain id from JsonRPCSevice, TxStateManager now doesn't need to depend on it.
Configuration menu - View commit details
-
Copy full SHA for 57dcf67 - Browse repository at this point
Copy the full SHA 57dcf67View commit details -
Support selected network per origin
We use different pref(kBraveWalletSelectedNetworksPerOrigin) to store that info, the original kBraveWalletSelectedNetworks will be a fallback pref when origin is not available when setting/getting selected networks. Previously cached `chain_ids_` and `network_urls_` are removed because `JsonPrefStore` already has a layer of memory cache so we won't directly read from disk.
Configuration menu - View commit details
-
Copy full SHA for 1f4d9b4 - Browse repository at this point
Copy the full SHA 1f4d9b4View commit details -
Propagate origin for ChainChangedEvent
It's used to filter out unwanted origin events, ex. dapp on origin A should not be notified when network changed on origin B.
Configuration menu - View commit details
-
Copy full SHA for 9d3b4fb - Browse repository at this point
Copy the full SHA 9d3b4fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 658aae3 - Browse repository at this point
Copy the full SHA 658aae3View commit details -
Optional chain_id for UpdatePendingTransactions & CheckIfBlockTracker…
…ShouldRun We should be able to update all the pending txs without specifying chain_id especially for cases like wallet unlock. When specifying chain_id, we won't need to pull out all the pending txs, ex. approve tx.
Configuration menu - View commit details
-
Copy full SHA for e3d792d - Browse repository at this point
Copy the full SHA e3d792dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e9101b8 - Browse repository at this point
Copy the full SHA e9101b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42fbb9f - Browse repository at this point
Copy the full SHA 42fbb9fView commit details -
Change active network to default network
Since now we will consider origin when determining active network, brave://settings/wallet/networks will be used to manage default network when per origin network is not set yet.
Configuration menu - View commit details
-
Copy full SHA for cfd775f - Browse repository at this point
Copy the full SHA cfd775fView commit details -
This only preseves backward compatibility with what current Android behavior is to comply with new interfaces. It doesn't update Android with new core network per origin capacity nor some new interfaces with fine-grained chain id option.
Configuration menu - View commit details
-
Copy full SHA for c05fc3e - Browse repository at this point
Copy the full SHA c05fc3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e19615b - Browse repository at this point
Copy the full SHA e19615bView commit details -
Add chain_id to SignMessageRequest, SignTransactionRequest and
SignAllTransactionsRequest To simplify front end displaying correct chain_id initiated from the dapp rather than the current selected network.
Configuration menu - View commit details
-
Copy full SHA for defb633 - Browse repository at this point
Copy the full SHA defb633View commit details -
Configuration menu - View commit details
-
Copy full SHA for d080694 - Browse repository at this point
Copy the full SHA d080694View commit details -
CheckIfBlockTrackerShouldRun refactor
We now have cached pending_chain_ids and new pending_chain_ids as input. When the function is called, it will stop out dated chain_id tracker and start tracker for new chain_id. If wallet is locked, all trackers will be stopped.
Configuration menu - View commit details
-
Copy full SHA for 5c308f4 - Browse repository at this point
Copy the full SHA 5c308f4View commit details -
EthLogTracker should be started with chain_id determined from origin.
It should also be stopped when chain_id changed.
Configuration menu - View commit details
-
Copy full SHA for 6f41ae7 - Browse repository at this point
Copy the full SHA 6f41ae7View commit details -
Split JsonRpcService.GetChainId into GetDefaultChainId and GetChainId…
…ForOrigin Both of them call non mojo GetChainIdSync
Configuration menu - View commit details
-
Copy full SHA for 0fcaa64 - Browse repository at this point
Copy the full SHA 0fcaa64View commit details