updates for cross-device sync #130

Merged
akinwale merged 7 commits from sync into master 2019-04-18 09:56:17 +02:00
3 changed files with 0 additions and 12 deletions
Showing only changes of commit 8c17d91b54 - Show all commits

4
dist/bundle.es.js vendored
View file

@ -1542,8 +1542,6 @@ function doUpdateBalance() {
} = getState();
lbryProxy.account_balance().then(balanceAsString => {
const balance = parseFloat(balanceAsString);
console.log(`balance=${balance}`);
if (balanceInStore !== balance) {
dispatch({
type: UPDATE_BALANCE,
@ -1563,10 +1561,8 @@ function doUpdateTotalBalance() {
} = getState();
lbryProxy.account_list().then(accountList => {
const { lbc_mainnet: accounts } = accountList;
console.log(accountList);
const totalSatoshis = accounts.length === 1 ? accounts[0].satoshis : accounts.reduce((a, b) => a.satoshis + b.satoshis);
const totalBalance = (Number.isNaN(totalSatoshis) ? 0 : totalSatoshis) / Math.pow(10, 8);
console.log(totalBalance);
if (totalBalanceInStore !== totalBalance) {
dispatch({
type: UPDATE_TOTAL_BALANCE,

4
dist/bundle.js vendored
View file

@ -3285,8 +3285,6 @@ function doUpdateBalance() {
_lbry2.default.account_balance().then(function (balanceAsString) {
var balance = parseFloat(balanceAsString);
console.log('balance=' + balance);
if (balanceInStore !== balance) {
dispatch({
type: ACTIONS.UPDATE_BALANCE,
@ -3307,12 +3305,10 @@ function doUpdateTotalBalance() {
_lbry2.default.account_list().then(function (accountList) {
var accounts = accountList.lbc_mainnet;
console.log(accountList);
var totalSatoshis = accounts.length === 1 ? accounts[0].satoshis : accounts.reduce(function (a, b) {
return a.satoshis + b.satoshis;
});
var totalBalance = (Number.isNaN(totalSatoshis) ? 0 : totalSatoshis) / Math.pow(10, 8);
console.log(totalBalance);
if (totalBalanceInStore !== totalBalance) {
dispatch({
type: ACTIONS.UPDATE_TOTAL_BALANCE,

View file

@ -11,8 +11,6 @@ export function doUpdateBalance() {
} = getState();
Lbry.account_balance().then(balanceAsString => {
const balance = parseFloat(balanceAsString);
console.log(`balance=${balance}`);
if (balanceInStore !== balance) {
dispatch({
type: ACTIONS.UPDATE_BALANCE,
@ -32,13 +30,11 @@ export function doUpdateTotalBalance() {
} = getState();
Lbry.account_list().then(accountList => {
const { lbc_mainnet: accounts } = accountList;
console.log(accountList);
const totalSatoshis =
accounts.length === 1
? accounts[0].satoshis
: accounts.reduce((a, b) => a.satoshis + b.satoshis);
const totalBalance = (Number.isNaN(totalSatoshis) ? 0 : totalSatoshis) / 10 ** 8;
console.log(totalBalance);
if (totalBalanceInStore !== totalBalance) {
dispatch({
type: ACTIONS.UPDATE_TOTAL_BALANCE,