mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service.git
synced 2026-09-21 16:52:03 -07:00
fix(minimal-slp-wallet): Updating to v7.1.4
This commit is contained in:
@@ -28,7 +28,7 @@ class Adapters {
|
|||||||
this.passport = new Passport()
|
this.passport = new Passport()
|
||||||
this.nodemailer = new Nodemailer()
|
this.nodemailer = new Nodemailer()
|
||||||
this.jsonFiles = new JSONFiles()
|
this.jsonFiles = new JSONFiles()
|
||||||
this.bchjs = new BCHJS()
|
this.bchjs = new BCHJS({ restURL: config.apiServer })
|
||||||
this.config = config
|
this.config = config
|
||||||
this.wallet = new Wallet(localConfig)
|
this.wallet = new Wallet(localConfig)
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,14 @@ describe('#adapters', () => {
|
|||||||
let uut, sandbox
|
let uut, sandbox
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
uut = new Adapters()
|
|
||||||
|
|
||||||
sandbox = sinon.createSandbox()
|
sandbox = sinon.createSandbox()
|
||||||
|
uut = new Adapters()
|
||||||
})
|
})
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
sandbox.restore()
|
if (sandbox) {
|
||||||
|
sandbox.restore()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('#start', () => {
|
describe('#start', () => {
|
||||||
|
|||||||
@@ -10,15 +10,23 @@ describe('#config', () => {
|
|||||||
before(() => {
|
before(() => {
|
||||||
// Backup the current environment setting.
|
// Backup the current environment setting.
|
||||||
currentEnv = process.env.SVC_ENV
|
currentEnv = process.env.SVC_ENV
|
||||||
|
// Clear SVC_ENV for the first test to ensure default behavior
|
||||||
|
delete process.env.SVC_ENV
|
||||||
})
|
})
|
||||||
|
|
||||||
after(() => {
|
after(() => {
|
||||||
// Restore the environment setting before starting these tests.
|
// Restore the environment setting before starting these tests.
|
||||||
process.env.SVC_ENV = currentEnv
|
if (currentEnv) {
|
||||||
|
process.env.SVC_ENV = currentEnv
|
||||||
|
} else {
|
||||||
|
delete process.env.SVC_ENV
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should return development environment config by default', async () => {
|
it('Should return development environment config by default', async () => {
|
||||||
const importedConfig = await import('../../../config/index.js')
|
// Ensure SVC_ENV is not set for this test
|
||||||
|
delete process.env.SVC_ENV
|
||||||
|
const importedConfig = await import('../../../config/index.js?foo=bar0')
|
||||||
const config = importedConfig.default
|
const config = importedConfig.default
|
||||||
// console.log('config: ', config)
|
// console.log('config: ', config)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class MockBchWallet {
|
|||||||
this.walletInfoPromise = true;
|
this.walletInfoPromise = true;
|
||||||
this.walletInfo = mockWallet;
|
this.walletInfo = mockWallet;
|
||||||
this.initialize = async () => {}
|
this.initialize = async () => {}
|
||||||
this.bchjs = new BCHJS();
|
this.bchjs = new BCHJS({ restURL: 'https://free-bch.fullstack.cash/' });
|
||||||
this.burnTokens = async () => {
|
this.burnTokens = async () => {
|
||||||
return { success: true, txid: 'txid' };
|
return { success: true, txid: 'txid' };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user