public async ValueTask <bool> EnableEthereumAsync() { var result = await _metamaskInterop.EnableEthereumAsync(); IsEthereumEnabled = result; if (EthereumEnabled != null) { await EthereumEnabled.Invoke(result); } return(result); }
public async Task <string> EnableProviderAsync() { var selectedAccount = await _metamaskInterop.EnableEthereumAsync(); Enabled = !string.IsNullOrEmpty(selectedAccount); if (Enabled) { SelectedAccount = selectedAccount; if (SelectedAccountChanged != null) { await SelectedAccountChanged.Invoke(selectedAccount); } return(selectedAccount); } return(null); }