From 06af479d7f8169921881ab379ced923ca59f60d4 Mon Sep 17 00:00:00 2001 From: owl352 Date: Mon, 18 Nov 2024 00:37:00 +0300 Subject: [PATCH 1/3] fix --- packages/api/src/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/api/src/server.js b/packages/api/src/server.js index 25c499f84..63d7c323f 100644 --- a/packages/api/src/server.js +++ b/packages/api/src/server.js @@ -17,6 +17,7 @@ const { getKnex } = require('./utils') const BlocksDAO = require('./dao/BlocksDAO') const DAPI = require('./DAPI') const RateController = require('./controllers/RateController') +const DAPIClient = require("@dashevo/dapi-client"); const { default: loadWasmDpp } = require('dash').PlatformProtocol function errorHandler (err, req, reply) { @@ -53,7 +54,10 @@ module.exports = { await client.platform.initialize() - const dapiClient = client.getDAPIClient() + const dapiClient = new DAPIClient({ + dapiAddresses: (process.env.DAPI_URL ?? '127.0.0.1:1443:self-signed').split(','), + network: process.env.NETWORK ?? 'testnet' + }) const { dpp } = client.platform From 44e7c27f4a82c8fbc437f0a4689e6b7ad45a1f1f Mon Sep 17 00:00:00 2001 From: owl352 Date: Mon, 18 Nov 2024 00:38:43 +0300 Subject: [PATCH 2/3] fix --- packages/api/src/server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/api/src/server.js b/packages/api/src/server.js index 63d7c323f..56af20f90 100644 --- a/packages/api/src/server.js +++ b/packages/api/src/server.js @@ -45,10 +45,7 @@ let dapi module.exports = { start: async () => { - client = new Dash.Client({ - dapiAddresses: (process.env.DAPI_URL ?? '127.0.0.1:1443:self-signed').split(','), - network: process.env.NETWORK ?? 'testnet' - }) + client = new Dash.Client() await loadWasmDpp() From d57987c662072d26a91a4f91de7a9cd3d385de20 Mon Sep 17 00:00:00 2001 From: owl352 Date: Mon, 18 Nov 2024 00:41:04 +0300 Subject: [PATCH 3/3] lint --- packages/api/src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/server.js b/packages/api/src/server.js index 56af20f90..691efa8db 100644 --- a/packages/api/src/server.js +++ b/packages/api/src/server.js @@ -17,7 +17,7 @@ const { getKnex } = require('./utils') const BlocksDAO = require('./dao/BlocksDAO') const DAPI = require('./DAPI') const RateController = require('./controllers/RateController') -const DAPIClient = require("@dashevo/dapi-client"); +const DAPIClient = require('@dashevo/dapi-client') const { default: loadWasmDpp } = require('dash').PlatformProtocol function errorHandler (err, req, reply) {