Skip to content

Commit

Permalink
Merge pull request #314 from pshenmic/feat/dapi-fix
Browse files Browse the repository at this point in the history
this.dapi.platform.getContestedResourceVoteState is not a function fix
  • Loading branch information
owl352 authored Nov 17, 2024
2 parents f6ef39c + d57987c commit dae2d34
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/api/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -44,16 +45,16 @@ 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()

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

Expand Down

0 comments on commit dae2d34

Please sign in to comment.