mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 01:02:05 -07:00
Merge pull request #38 from christroutner/unstable
fix(bch-js): replacing calls to bitbox-js with bch-js
This commit is contained in:
@@ -18,7 +18,7 @@ const router = express.Router()
|
||||
const util = require("util")
|
||||
util.inspect.defaultOptions = { depth: 1 }
|
||||
|
||||
const BITBOXJS = require("@chris.troutner/bitbox-js")
|
||||
const BITBOXJS = require("@chris.troutner/bch-js")
|
||||
const BITBOX = new BITBOXJS()
|
||||
|
||||
// Use the default (and max) page size of 1000
|
||||
@@ -578,9 +578,7 @@ async function unconfirmedSingle(req, res, next) {
|
||||
// Retrieve transaction data from the Insight API
|
||||
async function transactionsFromInsight(thisAddress, currentPage = 0) {
|
||||
try {
|
||||
const path = `${
|
||||
process.env.BITCOINCOM_BASEURL
|
||||
}txs/?address=${thisAddress}&pageNum=${currentPage}`
|
||||
const path = `${process.env.BITCOINCOM_BASEURL}txs/?address=${thisAddress}&pageNum=${currentPage}`
|
||||
|
||||
// Query the Insight server.
|
||||
const response = await axios.get(path)
|
||||
|
||||
@@ -10,7 +10,7 @@ const wlogger = require("../../util/winston-logging")
|
||||
const util = require("util")
|
||||
util.inspect.defaultOptions = { depth: 1 }
|
||||
|
||||
const BITBOXJS = require("@chris.troutner/bitbox-js")
|
||||
const BITBOXJS = require("@chris.troutner/bch-js")
|
||||
const BITBOX = new BITBOXJS()
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -8,7 +8,7 @@ const routeUtils = require("./route-utils")
|
||||
const logger = require("./logging.js")
|
||||
const wlogger = require("../../util/winston-logging")
|
||||
|
||||
const BITBOXJS = require("@chris.troutner/bitbox-js")
|
||||
const BITBOXJS = require("@chris.troutner/bch-js")
|
||||
const BITBOX = new BITBOXJS()
|
||||
|
||||
// Used to convert error messages to strings, to safely pass to users.
|
||||
|
||||
@@ -8,7 +8,7 @@ const routeUtils = require("./route-utils")
|
||||
const logger = require("./logging.js")
|
||||
const wlogger = require("../../util/winston-logging")
|
||||
|
||||
const BITBOXJS = require("@chris.troutner/bitbox-js")
|
||||
const BITBOXJS = require("@chris.troutner/bch-js")
|
||||
const BITBOX = new BITBOXJS()
|
||||
|
||||
// Used to convert error messages to strings, to safely pass to users.
|
||||
|
||||
Reference in New Issue
Block a user