Compare commits

...
3 Commits
Author SHA1 Message Date
Chris Troutner f41cac9fc7 Merge pull request #16 from Permissionless-Software-Foundation/ct-unstable
fix(broadcast): Fixing bug in broadcast JSON RPC
2021-08-15 09:07:09 -07:00
Chris Troutner 8ad1400d3c fix(error reporting): Adding JSON RPC error reporting 2021-08-15 08:32:39 -07:00
Chris Troutner e48a9213c5 fix(broadcast): Fixing bug in broadcast JSON RPC 2021-08-13 16:15:44 -07:00
+13 -7
View File
@@ -146,7 +146,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH transactions()')
// throw err
// Return an error response
@@ -223,7 +223,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH balance()')
// throw err
// Return an error response
@@ -336,7 +336,8 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH utxos()')
console.error('Error in JSON RPC utxos(): ', err)
// throw err
// Return an error response
@@ -388,12 +389,17 @@ class BCHRPC {
const data = await this.bchjs.RawTransactions.sendRawTransaction(hex)
// console.log(`data: ${JSON.stringify(data, null, 2)}`)
const retObj = data
retObj.status = 200
const retObj = {
success: true,
status: 200,
endpoint: 'broadcast',
txid: data
}
// retObj.status = 200
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH broadcast()')
// throw err
// Return an error response
@@ -514,7 +520,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH transaction()')
// throw err
// Return an error response