re-add 8 second magical delay, turns out it's important
This commit is contained in:
parent
34adb9ebe5
commit
d7b160f9b3
1 changed files with 16 additions and 14 deletions
|
|
@ -198,21 +198,23 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
|
|||
});
|
||||
};
|
||||
|
||||
var tx = b.data ? b.data.transaction : null;
|
||||
if (tx) {
|
||||
processBuyTx(tx);
|
||||
}
|
||||
else {
|
||||
coinbaseService.getBuyOrder(accessToken, accountId, b.data.id, function (err, buyResp) {
|
||||
if (err) {
|
||||
ongoingProcess.set('buyingBitcoin', false, statusChangeHandler);
|
||||
showError(err);
|
||||
return;
|
||||
}
|
||||
var tx = buyResp.data ? buyResp.data.transaction : null;
|
||||
$timeout(function() {
|
||||
var tx = b.data ? b.data.transaction : null;
|
||||
if (tx) {
|
||||
processBuyTx(tx);
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
coinbaseService.getBuyOrder(accessToken, accountId, b.data.id, function (err, buyResp) {
|
||||
if (err) {
|
||||
ongoingProcess.set('buyingBitcoin', false, statusChangeHandler);
|
||||
showError(err);
|
||||
return;
|
||||
}
|
||||
var tx = buyResp.data ? buyResp.data.transaction : null;
|
||||
processBuyTx(tx);
|
||||
});
|
||||
}
|
||||
}, 8000);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue