Closed khanti42 closed 2 weeks ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Can't happen. Provider detection has to happen before remoteEntry.js is loaded.
This PR fixes #268
It enhances the
MetaMaskSnapWallet
implementation by adding support for detecting and initializing a MetaMask provider. Key changes include:MetaMaskProvider
interface and related utility functions (isMetaMaskProvider
,getProvider
,detectMetaMaskProvider
, andwaitForMetaMaskProvider
) to handle MetaMask provider detection and initialization.MetaMaskSnapWallet
class to utilize the new provider detection logic, ensuring the wallet initializes with a valid MetaMask provider.init
method inMetaMaskSnapWallet
to asynchronously fetch and assign the MetaMask provider.These improvements ensure that the
MetaMaskSnapWallet
can robustly detect and initialize MetaMask providers, enhancing the reliability and usability of the MetaMask integration. This update makes theget-starknet
integration as minimalist as possible and facilitates further interaction with thestarknet/get-starknet
repo.