@@ -266,7 +266,13 @@ void SendWidget::onUriParsed(SendCoinsRecipient rcp){
266266}
267267
268268void SendWidget::onAddEntryClicked (){
269- // TODO: Validations here..
269+ // Check prev valid entries before add a new one.
270+ for (SendMultiRow* entry : entries){
271+ if (!entry || !entry->validate ()) {
272+ inform (tr (" Invalid entry, previous entries must be valid before add a new one" ));
273+ return ;
274+ }
275+ }
270276 addEntry ();
271277}
272278
@@ -285,15 +291,13 @@ void SendWidget::onSendClicked(){
285291
286292 for (SendMultiRow* entry : entries){
287293 // TODO: Check what is the UTXO splitter here..
288-
289294 // Validate send..
290295 if (entry && entry->validate ()) {
291296 recipients.append (entry->getValue ());
292297 }else {
293298 inform (tr (" Invalid entry" ));
294299 return ;
295300 }
296-
297301 }
298302
299303 if (recipients.isEmpty ()) {
@@ -356,7 +360,6 @@ bool SendWidget::send(QList<SendCoinsRecipient> recipients){
356360 inform (tr (" Transaction sent" ));
357361 return true ;
358362 }
359-
360363 }
361364
362365 dialog->deleteLater ();
@@ -778,7 +781,6 @@ void SendWidget::resizeMenu(){
778781 menuContacts->resizeList (width, menuContacts->height ());
779782 menuContacts->resize (width, menuContacts->height ());
780783 QPoint pos = focusedEntry->getEditLineRect ().bottomLeft ();
781- // TODO: Change this position..
782784 pos.setX (pos.x () + 20 );
783785 pos.setY (pos.y () + ((focusedEntry->getEditHeight () - 12 ) * 3 ));
784786 menuContacts->move (pos);
0 commit comments