Skip to content

Commit

Permalink
workaround issue where container plugin mangles widget ID
Browse files Browse the repository at this point in the history
  • Loading branch information
hiveuprss committed May 6, 2021
1 parent 4f8490c commit aa935fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hive-engine-price.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function getHivePrice() {
})
}

function getTokenPrice(token, content_div_id) {
function getTokenPrice(token, div) {
var hivePrice = getHivePrice()
var sellBook = getSellBook(token)

Expand All @@ -46,7 +46,7 @@ function getTokenPrice(token, content_div_id) {
let sellBook = result[1]
sellBook = sellBook.sort( (a,b) => Number(a.price) - Number(b.price) )

var targetDiv = document.querySelector('div#' + content_div_id)
var targetDiv = div

let sellOrder = sellBook[0]

Expand All @@ -60,7 +60,7 @@ function getTokenPrice(token, content_div_id) {
Array.from(document.querySelectorAll('div.hep_widget_content')).forEach( (div) => {
let token_name = div.getAttribute('data-token-name')
let div_id = div.getAttribute('id')
getTokenPrice(token_name.toUpperCase(), div_id)
getTokenPrice(token_name.toUpperCase(), div)
})


0 comments on commit aa935fb

Please sign in to comment.