@@ -4691,7 +4691,7 @@ func (s *Server) setVoteChoice(ctx context.Context, icmd interface{}) (interface
4691
4691
ticketHash = hash
4692
4692
}
4693
4693
4694
- choice := [] wallet.AgendaChoice {
4694
+ choice := wallet.AgendaChoices {
4695
4695
{
4696
4696
AgendaID : cmd .AgendaID ,
4697
4697
ChoiceID : cmd .ChoiceID ,
@@ -4708,7 +4708,8 @@ func (s *Server) setVoteChoice(ctx context.Context, icmd interface{}) (interface
4708
4708
}
4709
4709
4710
4710
func (s * Server ) updateVSPVoteChoices (ctx context.Context , w * wallet.Wallet , ticketHash * chainhash.Hash ,
4711
- choices []wallet.AgendaChoice , tspendPolicy map [string ]string , treasuryPolicy map [string ]string ) error {
4711
+ choices wallet.AgendaChoices , tspendPolicy map [string ]string , treasuryPolicy map [string ]string ) error {
4712
+
4712
4713
if ticketHash != nil {
4713
4714
vspHost , err := w .VSPHostForTicket (ctx , ticketHash )
4714
4715
if err != nil {
@@ -4722,7 +4723,7 @@ func (s *Server) updateVSPVoteChoices(ctx context.Context, w *wallet.Wallet, tic
4722
4723
if err != nil {
4723
4724
return err
4724
4725
}
4725
- err = vspClient .SetVoteChoice (ctx , ticketHash , choices , tspendPolicy , treasuryPolicy )
4726
+ err = vspClient .SetVoteChoice (ctx , ticketHash , choices . Map () , tspendPolicy , treasuryPolicy )
4726
4727
return err
4727
4728
}
4728
4729
var firstErr error
@@ -4743,7 +4744,7 @@ func (s *Server) updateVSPVoteChoices(ctx context.Context, w *wallet.Wallet, tic
4743
4744
}
4744
4745
// Never return errors here, so all tickets are tried.
4745
4746
// The first error will be returned to the user.
4746
- err = vspClient .SetVoteChoice (ctx , hash , choices , tspendPolicy , treasuryPolicy )
4747
+ err = vspClient .SetVoteChoice (ctx , hash , choices . Map () , tspendPolicy , treasuryPolicy )
4747
4748
if err != nil && firstErr == nil {
4748
4749
firstErr = err
4749
4750
}
0 commit comments