Skip to content

Commit

Permalink
fix(hapi): remove nodes key from bpjson where is not from the current…
Browse files Browse the repository at this point in the history
… network
  • Loading branch information
Torresmorah committed Nov 4, 2022
1 parent 441f0a6 commit 540d5b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hapi/src/services/eosio.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ const getBPJsons = async (producers = []) => {

bpJson = await getBPJson(producerUrl, chainUrl || '/bp.json')

if (!chainUrl && !isEosNetwork) {
if (bpJson && !chainUrl && !isEosNetwork) {
const { org, producer_account_name } = bpJson

bpJson = {
org: bpJson.org,
producer_account_name: bpJson.producer_account_name
...(org && { org }),
...(producer_account_name && { producer_account_name })
}
}
}
Expand Down

0 comments on commit 540d5b4

Please sign in to comment.