Skip to content

Commit

Permalink
Additional debugging to detect some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chiguireitor committed Jan 6, 2019
1 parent bb056b0 commit 9845dd6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/js/components/balances.js
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ function SweepModalViewModel() {
if (!address || address == '') return;

//Get the balance of ALL assets at this address
$.jqlog.debug('Updating normalized balances for a single address at balances ' + address)
failoverAPI("get_normalized_balances", {'addresses': [address]}, function(balancesData, endpoint) {
var assets = [], assetInfo = null;
for (var i = 0; i < balancesData.length; i++) {
Expand Down
1 change: 1 addition & 0 deletions src/js/components/balances_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ function PayDividendModalViewModel() {
trackDialogShow('PayDividend');

//Get the balance of ALL assets at this address
$.jqlog.debug('Updating normalized balances for a single address at balance_assets ' + address.ADDRESS)
failoverAPI("get_normalized_balances", {'addresses': [address.ADDRESS]}, function(data, endpoint) {
for (var i = 0; i < data.length; i++) {
if (data[i]['quantity'] !== null && data[i]['quantity'] !== 0)
Expand Down
1 change: 1 addition & 0 deletions src/js/components/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ function WalletViewModel() {
//update all counterparty asset balances for the specified address (including XCP)
//Note: after login, this normally never needs to be called (except when adding a watch address),
// as counterparty asset balances are updated automatically via the messages feed
$.jqlog.debug('Updating normalized balances for a multiple addresses at wallet ' + addresses)
failoverAPI("get_normalized_balances", {'addresses': addresses},
function(balancesData, endpoint) {
$.jqlog.debug("Got initial balances: " + JSON.stringify(balancesData));
Expand Down
2 changes: 1 addition & 1 deletion src/js/counterblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Counterblock = {};
Counterblock.getBalances = function(addresses, cwkeys, callback) {

WALLET.retrieveBTCAddrsInfo(addresses, function(btcData) {
$.jqlog.debug('Updating normalized balances for a single addresses at counterblock ' + addresses)
failoverAPI("get_normalized_balances", {'addresses': addresses}, function(assetsData, endpoint) {
var data = {};
// extracts all asset except BTC
Expand Down Expand Up @@ -33,4 +34,3 @@ Counterblock.getBalances = function(addresses, cwkeys, callback) {
});

}

0 comments on commit 9845dd6

Please sign in to comment.