Update index.html
- Fixed: BTC base value not parsing decimal - UI fix: Base USD value is displayed as float (2 decimals)
This commit is contained in:
parent
ac67acb5ac
commit
685f848f03
@ -10396,7 +10396,7 @@ Bitcoin.Util = {
|
|||||||
this.shadow.querySelector('.fund-link').remove()
|
this.shadow.querySelector('.fund-link').remove()
|
||||||
this.shadow.querySelector('.start-date').textContent = startDate
|
this.shadow.querySelector('.start-date').textContent = startDate
|
||||||
this.shadow.querySelector('.end-date').textContent = endDate
|
this.shadow.querySelector('.end-date').textContent = endDate
|
||||||
this.shadow.querySelector('.base-usd').textContent = `₹${baseUsd}`
|
this.shadow.querySelector('.base-usd').textContent = `${baseUsd.toLocaleString(`en-US`, {style: 'currency', currency: 'INR'})}`
|
||||||
this.shadow.querySelector('.base-btc').textContent = `${baseBtc.toLocaleString(`en-US`, {style: 'currency', currency: 'USD'})}`
|
this.shadow.querySelector('.base-btc').textContent = `${baseBtc.toLocaleString(`en-US`, {style: 'currency', currency: 'USD'})}`
|
||||||
this.shadow.querySelector('.investors-group-list').append(investorsFrag)
|
this.shadow.querySelector('.investors-group-list').append(investorsFrag)
|
||||||
|
|
||||||
@ -11000,7 +11000,7 @@ Bitcoin.Util = {
|
|||||||
const parseNumber = (str) => {
|
const parseNumber = (str) => {
|
||||||
let n = 0
|
let n = 0
|
||||||
str.replace(/,/g, '').match(/[\d.]+ *[a-z]*/gi).forEach(s => {
|
str.replace(/,/g, '').match(/[\d.]+ *[a-z]*/gi).forEach(s => {
|
||||||
let v = s.match(/\d+/),
|
let v = s.match(/\d+(.\d+)?/),
|
||||||
m = s.match(/[a-z]+/i);
|
m = s.match(/[a-z]+/i);
|
||||||
n += parseFloat(v) * (m ? magnitude[m] : 1)
|
n += parseFloat(v) * (m ? magnitude[m] : 1)
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user