convert balance to number before saving
This commit is contained in:
parent
1ed2ea8b2d
commit
e6db47b432
2 changed files with 6 additions and 2 deletions
4
dist/bundle.js
vendored
4
dist/bundle.js
vendored
|
@ -4106,7 +4106,9 @@ function doUpdateBalance() {
|
|||
var _getState = getState(),
|
||||
balanceInStore = _getState.wallet.balance;
|
||||
|
||||
_lbry2.default.account_balance().then(function (balance) {
|
||||
_lbry2.default.account_balance().then(function (balanceAsString) {
|
||||
var balance = parseFloat(balanceAsString);
|
||||
|
||||
if (balanceInStore !== balance) {
|
||||
dispatch({
|
||||
type: ACTIONS.UPDATE_BALANCE,
|
||||
|
|
|
@ -9,7 +9,9 @@ export function doUpdateBalance() {
|
|||
const {
|
||||
wallet: { balance: balanceInStore },
|
||||
} = getState();
|
||||
Lbry.account_balance().then((balance) => {
|
||||
Lbry.account_balance().then((balanceAsString) => {
|
||||
const balance = parseFloat(balanceAsString);
|
||||
|
||||
if (balanceInStore !== balance) {
|
||||
dispatch({
|
||||
type: ACTIONS.UPDATE_BALANCE,
|
||||
|
|
Loading…
Reference in a new issue