mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-02 08:58:33 +02:00
use floor() instead of round() to convert msat to sat in frontend (#2070)
* use floor() instead of round() to convert msat to sat in frontend
This commit is contained in:
parent
3e142fab0f
commit
1ab68e80b3
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -196,7 +196,7 @@ window.LNbits = {
|
||||
currency: data.currency
|
||||
}
|
||||
newWallet.msat = data.balance_msat
|
||||
newWallet.sat = Math.round(data.balance_msat / 1000)
|
||||
newWallet.sat = Math.floor(data.balance_msat / 1000)
|
||||
newWallet.fsat = new Intl.NumberFormat(window.LOCALE).format(
|
||||
newWallet.sat
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
// update cache version every time there is a new deployment
|
||||
// so the service worker reinitializes the cache
|
||||
const CACHE_VERSION = 67
|
||||
const CACHE_VERSION = 68
|
||||
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
|
||||
|
||||
const getApiKey = request => {
|
||||
|
@ -791,7 +791,7 @@ new Vue({
|
||||
},
|
||||
fetchBalance: function () {
|
||||
LNbits.api.getWallet(this.g.wallet).then(response => {
|
||||
this.balance = Math.round(response.data.balance / 1000)
|
||||
this.balance = Math.floor(response.data.balance / 1000)
|
||||
EventHub.$emit('update-wallet-balance', [
|
||||
this.g.wallet.id,
|
||||
this.balance
|
||||
|
Loading…
x
Reference in New Issue
Block a user