Fix buying if operation is not completed inmediatly (#4110)

This commit is contained in:
Gustavo Maximiliano Cortez 2016-04-21 17:20:10 -03:00 committed by Matias Alejo Garcia
commit 5886b22f07
2 changed files with 5 additions and 5 deletions

View file

@ -151,10 +151,10 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController',
self.error = {errors: [{ message: 'Could not create address' }]};
return;
}
coinbaseService.savePendingTransaction(updatedTx.data, {toAddr: addr}, function(err) {
updatedTx.data['toAddr'] = addr;
coinbaseService.savePendingTransaction(updatedTx.data, {}, function(err) {
self.loading = null;
if (err) $log.debug(err);
updatedTx.data['toAddr'] = addr;
if (updatedTx.data.status == 'completed') {
self.sendToCopay(token, account, updatedTx.data);
} else {