When the get-startnet UI is not used and WalletAccount is used with the MetaMask Virtual Wallet in starknet.js, an error is thrown due to the MetaMask Virtual Wallet not being loaded while WalletAccount sends an API request to wallet_requestAccounts during construction.
This PR loads the MetaMask Virtual Wallet on-the-fly whenever the API request is being handled.
This PR also adds support for two RPC APIs (wallet_supportedWalletApi and wallet_supportedSpecs) even if the virtual wallet is not connected.
This pull request addresses the following issues:
When the
get-startnet
UI is not used andWalletAccount
is used with theMetaMask Virtual Wallet
instarknet.js
, an error is thrown due to theMetaMask Virtual Wallet
not being loaded whileWalletAccount
sends an API request towallet_requestAccounts
during construction.This PR loads the
MetaMask Virtual Wallet
on-the-fly whenever the API request is being handled.This PR also adds support for two RPC APIs (
wallet_supportedWalletApi
andwallet_supportedSpecs
) even if the virtual wallet is not connected.