Merge pull request #105 from lbryio/balance

convert balance to number before saving
This commit is contained in:
Sean Yesmunt 2018-12-05 10:59:03 -05:00 committed by GitHub
commit b79eb17d42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

4
dist/bundle.js vendored
View file

@ -4107,7 +4107,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,