Merge pull request #6158 from sdobz/null-transaction

get updated buy order if it does not initally include a transaction
This commit is contained in:
Gustavo Maximiliano Cortez 2017-06-06 10:09:45 -03:00 committed by GitHub
commit a0e273059e
2 changed files with 36 additions and 7 deletions

View file

@ -302,6 +302,17 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $
});
};
root.getBuyOrder = function(token, accountId, buyId, cb) {
if (!token) return cb('Invalid Token');
$http(_get('/accounts/' + accountId + '/buys/' + buyId, token)).then(function(data) {
$log.info('Coinbase Buy Info: SUCCESS');
return cb(null, data.data);
}, function(data) {
$log.error('Coinbase Buy Info: ERROR ' + data.statusText);
return cb(data.data);
});
};
root.getTransaction = function(token, accountId, transactionId, cb) {
if (!token) return cb('Invalid Token');
$http(_get('/accounts/' + accountId + '/transactions/' + transactionId, token)).then(function(data) {