From 41a3cd91fcdd622e15d82ca28a290d4a9ea4505c Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 1 Oct 2020 20:20:28 -0700 Subject: [PATCH] fix(hydrateUtxos): Using local calls to the REST API --- src/routes/v3/slp.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/v3/slp.js b/src/routes/v3/slp.js index 3a7ef33..accd8c8 100644 --- a/src/routes/v3/slp.js +++ b/src/routes/v3/slp.js @@ -13,8 +13,11 @@ const Slpdb = require('./services/slpdb') // const strftime = require('strftime') const wlogger = require('../../util/winston-logging') +const LOCAL_RESTURL = process.env.LOCAL_RESTURL + ? process.env.LOCAL_RESTURL + : 'https://api.fullstack.cash/v3/' const BCHJS = require('@psf/bch-js') -const bchjs = new BCHJS() +const bchjs = new BCHJS({ restURL: LOCAL_RESTURL }) // Used to convert error messages to strings, to safely pass to users. const util = require('util')