Skip to content

Commit

Permalink
fix(webapp): links in rewards distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloCG97 committed May 3, 2022
1 parent 580cf04 commit 53167e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/routes/BPJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const getBPJsonUrl = async (producer = {}) => {
let producerUrl = producer.url || ''

if (!producerUrl.startsWith('http')) {
producerUrl = `https://${producerUrl}`
producerUrl = `http://${producerUrl}`
}

if (producer.owner === 'eosauthority') {
Expand All @@ -44,7 +44,7 @@ const getBPJsonUrl = async (producer = {}) => {
data: { chains }
} = await axios.get(chainsUrl)
chainUrl = chains[ualConfig.network.chainId] || chainUrl
} catch (error) {}
} catch (error) { }

return `${producerUrl}/${chainUrl}`.replace(/(?<=:\/\/.*)((\/\/))/, '/')
}
Expand All @@ -53,7 +53,7 @@ const getBpJSONOffChain = async (producer) => {
try {
const bpUrl = await getBPJsonUrl(producer)

if (bpUrl === 'https:///bp.json') return undefined
if (bpUrl === 'http:///bp.json') return undefined
const { data: bpJson } = await axios.get(bpUrl, {
timeout: 5000
})
Expand Down

0 comments on commit 53167e4

Please sign in to comment.