Minor fixes (address concerns on PR #35)
This commit is contained in:
parent
c846ccdeeb
commit
808b191648
@ -8,6 +8,5 @@ RPC:
|
||||
username: username
|
||||
password: password
|
||||
protocol: http
|
||||
network: livenet
|
||||
host: 127.0.0.1
|
||||
port: 8332
|
||||
|
||||
@ -34,7 +34,7 @@ TransactionService.transactionRPCtoBitcore = function(rpcResponse) {
|
||||
if (rpcResponse.error) {
|
||||
throw new bitcore.Error(rpcResponse.error);
|
||||
}
|
||||
return rpcResponse.result;
|
||||
return new bitcore.Transaction(rpcResponse.result);
|
||||
};
|
||||
|
||||
TransactionService.prototype.getTransaction = function(transactionId) {
|
||||
@ -44,7 +44,7 @@ TransactionService.prototype.getTransaction = function(transactionId) {
|
||||
return Promise.try(function() {
|
||||
return self.rpc.getRawTransactionAsync(transactionId);
|
||||
}).then(function(rawTransaction) {
|
||||
return new bitcore.Transaction(TransactionService.transactionRPCtoBitcore(rawTransaction));
|
||||
return TransactionService.transactionRPCtoBitcore(rawTransaction);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ describe('BlockService', function() {
|
||||
rpc: 'rpc',
|
||||
transactionService: 'txService'
|
||||
});
|
||||
blockService.should.exist;
|
||||
should.exist(blockService);
|
||||
blockService.database.should.equal(database);
|
||||
blockService.rpc.should.equal(rpc);
|
||||
blockService.transactionService.should.equal(txService);
|
||||
|
||||
@ -20,7 +20,7 @@ describe('TransactionService', function() {
|
||||
database: database,
|
||||
rpc: rpc
|
||||
});
|
||||
service.should.exist;
|
||||
should.exist(service);
|
||||
});
|
||||
|
||||
describe('get', function() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user