mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
Merge pull request #8 from christroutner/unstable
fix(SLP): Passing API tokens to SLP library
This commit is contained in:
+2
-1
@@ -19,13 +19,14 @@ class SLP {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
const tmp = {}
|
const tmp = {}
|
||||||
if (!config || !config.restURL) {
|
if (!config || !config.restURL) {
|
||||||
tmp.restURL = `https://api.bchjs.cash/v3/`
|
tmp.restURL = `https://api.fullstack.cash/v3/`
|
||||||
} else {
|
} else {
|
||||||
tmp.restURL = config.restURL
|
tmp.restURL = config.restURL
|
||||||
tmp.apiToken = config.apiToken
|
tmp.apiToken = config.apiToken
|
||||||
}
|
}
|
||||||
|
|
||||||
this.restURL = tmp.restURL
|
this.restURL = tmp.restURL
|
||||||
|
this.apiToken = tmp.apiToken
|
||||||
|
|
||||||
this.Address = new Address(tmp)
|
this.Address = new Address(tmp)
|
||||||
this.ECPair = ECPair
|
this.ECPair = ECPair
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ util.inspect.defaultOptions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe(`#SLP`, () => {
|
describe(`#SLP`, () => {
|
||||||
|
before(() => {
|
||||||
|
console.log(`bchjs.SLP.restURL: ${bchjs.SLP.restURL}`)
|
||||||
|
console.log(`bchjs.SLP.apiToken: ${bchjs.SLP.apiToken}`)
|
||||||
|
})
|
||||||
|
|
||||||
describe("#util", () => {
|
describe("#util", () => {
|
||||||
describe("#list", () => {
|
describe("#list", () => {
|
||||||
it(`should get information on the Spice token`, async () => {
|
it(`should get information on the Spice token`, async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user