private Task SaveWalletVotePreference(Agenda agenda, Agenda.Choice choice) { var walletClient = App.Current.Synchronizer.WalletRpcClient; var choices = new TupleValue <string, string>[] { TupleValue.Create(agenda.ID, choice.ID) }; return(walletClient.SetVoteChoicesAsync(choices)); }
private void OnAgendaChoiceChanged(Agenda agenda, Agenda.Choice choice) { Task.WhenAll(SaveWalletVotePreference(agenda, choice), UpdateStakepoolVotePreferences()).ContinueWith(t => { var ex = t.Exception; if (ex != null) { MessageBox.Show(ex.InnerException.Message, "Failed to set vote preferences"); } }); }
public AgendaChoiceViewModel(Agenda agenda, Agenda.Choice choice, Action <Agenda, Agenda.Choice> setChoice) { Agenda = agenda; _setChoice = setChoice; _selectedChoice = choice; }