mirror of https://github.com/BTCPrivate/copay.git
re-add 8 second magical delay, turns out it's important
This commit is contained in:
parent
34adb9ebe5
commit
d7b160f9b3
|
@ -198,21 +198,23 @@ angular.module('copayApp.controllers').controller('buyCoinbaseController', funct
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var tx = b.data ? b.data.transaction : null;
|
$timeout(function() {
|
||||||
if (tx) {
|
var tx = b.data ? b.data.transaction : null;
|
||||||
processBuyTx(tx);
|
if (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);
|
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…
Reference in New Issue