public async Task ChangeSelectedAccountAsync(string selectedAccount) { if (SelectedAccount != selectedAccount) { SelectedAccount = selectedAccount; if (SelectedAccountChanged != null) { await SelectedAccountChanged.Invoke(selectedAccount); } } }
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); }