updates for cross-device sync #130
3 changed files with 0 additions and 12 deletions
4
dist/bundle.es.js
vendored
4
dist/bundle.es.js
vendored
|
@ -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
4
dist/bundle.js
vendored
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue