Merge pull request #105 from lbryio/balance
convert balance to number before saving
This commit is contained in:
commit
b79eb17d42
2 changed files with 6 additions and 2 deletions
4
dist/bundle.js
vendored
4
dist/bundle.js
vendored
|
@ -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,
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue