psf-bch-api 7.3.3 → 7.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,9 +6,14 @@ import wlogger from '../adapters/wlogger.js'
|
|
|
6
6
|
import BCHJS from '@psf/bch-js'
|
|
7
7
|
import config from '../config/index.js'
|
|
8
8
|
|
|
9
|
+
// Use RESTURL (from test) or REST_URL (from psf-bch-api config) or fallback to config
|
|
10
|
+
const restURL = process.env.RESTURL || process.env.REST_URL || process.env.LOCAL_RESTURL || config.restURL
|
|
11
|
+
// Use BCHJSBEARERTOKEN (from test) or BASIC_AUTH_TOKEN (from psf-bch-api config) or fallback to config
|
|
12
|
+
const bearerToken = process.env.BCHJSBEARERTOKEN || process.env.BASIC_AUTH_TOKEN || config.basicAuth.token
|
|
13
|
+
|
|
9
14
|
const bchjs = new BCHJS({
|
|
10
|
-
restURL
|
|
11
|
-
bearerToken
|
|
15
|
+
restURL,
|
|
16
|
+
bearerToken
|
|
12
17
|
})
|
|
13
18
|
|
|
14
19
|
class FulcrumUseCases {
|