convert balance to number before saving

This commit is contained in:
Sean Yesmunt 2018-12-02 23:30:29 -05:00
parent 1ed2ea8b2d
commit e6db47b432
2 changed files with 6 additions and 2 deletions

4
dist/bundle.js vendored
View file

@ -4106,7 +4106,9 @@ function doUpdateBalance() {
var _getState = getState(), var _getState = getState(),
balanceInStore = _getState.wallet.balance; 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) { if (balanceInStore !== balance) {
dispatch({ dispatch({
type: ACTIONS.UPDATE_BALANCE, type: ACTIONS.UPDATE_BALANCE,

View file

@ -9,7 +9,9 @@ export function doUpdateBalance() {
const { const {
wallet: { balance: balanceInStore }, wallet: { balance: balanceInStore },
} = getState(); } = getState();
Lbry.account_balance().then((balance) => { Lbry.account_balance().then((balanceAsString) => {
const balance = parseFloat(balanceAsString);
if (balanceInStore !== balance) { if (balanceInStore !== balance) {
dispatch({ dispatch({
type: ACTIONS.UPDATE_BALANCE, type: ACTIONS.UPDATE_BALANCE,