fix creditsToString function for small decimals
This commit is contained in:
parent
5edee274b2
commit
e3e8a881d2
2 changed files with 5 additions and 14 deletions
11
dist/bundle.js
vendored
11
dist/bundle.js
vendored
|
@ -1921,8 +1921,7 @@ function doAbandonClaim(txid, nout) {
|
|||
var _myClaims$find = myClaims.find(function (claim) {
|
||||
return claim.txid === txid && claim.nout === nout;
|
||||
}),
|
||||
claimId = _myClaims$find.claim_id,
|
||||
name = _myClaims$find.name;
|
||||
claimId = _myClaims$find.claim_id;
|
||||
|
||||
dispatch({
|
||||
type: ACTIONS.ABANDON_CLAIM_STARTED,
|
||||
|
@ -4557,12 +4556,8 @@ function formatFullPrice(amount) {
|
|||
}
|
||||
|
||||
function creditsToString(amount) {
|
||||
var creditString = String(amount);
|
||||
|
||||
if (creditString.includes('.')) {
|
||||
return creditString;
|
||||
}
|
||||
return creditString + '.0';
|
||||
var creditString = parseFloat(amount).toFixed(8);
|
||||
return creditString;
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
|
|
@ -24,10 +24,6 @@ export function formatFullPrice(amount, precision = 1) {
|
|||
}
|
||||
|
||||
export function creditsToString(amount) {
|
||||
const creditString = String(amount);
|
||||
|
||||
if (creditString.includes('.')) {
|
||||
return creditString;
|
||||
}
|
||||
return `${creditString}.0`;
|
||||
const creditString = parseFloat(amount).toFixed(8);
|
||||
return creditString;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue