add one method for format price show
This commit is contained in:
parent
6a6b3acc8e
commit
fa4363c2fc
File diff suppressed because one or more lines are too long
@ -519,3 +519,14 @@ function tokenList(funId) {
|
||||
function tokenPrice(funId, tokenName, amount) {
|
||||
promiseCb(funId, jc.wallet.calcTokenPrice(tokenName, amount));
|
||||
}
|
||||
/**
|
||||
* format price
|
||||
*/
|
||||
function formatPrice(funId, value, decimal, fixed) {
|
||||
try {
|
||||
let data = jc.wallet.formatPrice(value, decimal, fixed);
|
||||
return JSON.stringify({ errcode: 0, data });
|
||||
} catch (err) {
|
||||
return JSON.stringify({ errcode: 1, errmsg: err.message || err });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user