Skip to content

Commit

Permalink
f: use ENV.DASH_RPC_PROTOCOL for rpc url
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Jul 14, 2024
1 parent 6025aa1 commit af58cec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ var CJDemo = ('object' === typeof module && exports) || {};
let evonodes = [];
{
//let resp = await rpc.masternodelist();
let res = await fetch('http://127.0.0.1:8080/rpc/masternodelist');
let rpcBaseUrl = `${ENV.DASH_RPC_PROTOCOL}://${ENV.DASH_RPC_HOST}:${ENV.DASH_RPC_PORT}`;
let res = await fetch(`${rpcBaseUrl}/rpc/masternodelist`);
let resp = await res.json();
let evonodesMap = resp.result;
let evonodeProTxIds = Object.keys(evonodesMap);
Expand Down

0 comments on commit af58cec

Please sign in to comment.