Commit d361a96a authored by Jason Salyers's avatar Jason Salyers
Browse files

[JES] Add claim_rewards back into history that is displayed on the wallet...

[JES] Add claim_rewards back into history that is displayed on the wallet page. I had disabled it to test something else
parent 4224e4b2
...@@ -22,7 +22,7 @@ let wallet_operations_bitmask = makeBitMaskFilter([ ...@@ -22,7 +22,7 @@ let wallet_operations_bitmask = makeBitMaskFilter([
op.escrow_release, op.escrow_release,
op.fill_convert_request, op.fill_convert_request,
op.fill_order, op.fill_order,
//op.claim_reward_balance, op.claim_reward_balance,
]); ]);
async function getStateForTrending() { async function getStateForTrending() {
...@@ -78,34 +78,40 @@ async function getGenericState(user) { ...@@ -78,34 +78,40 @@ async function getGenericState(user) {
return result; return result;
} }
async function getTransferHistory(account) async function getTransferHistory(account) {
{
let transfer_history = null; let transfer_history = null;
let start_sequence = -1; let start_sequence = -1;
let all_transfers = [];
try try {
{ transfer_history = await api.getAccountHistoryAsync(
transfer_history = await api.getAccountHistoryAsync(account, start_sequence, 500, ...wallet_operations_bitmask); account,
console.log("got transfer history: ", transfer_history); start_sequence,
console.log("transfer history length: ", transfer_history.length); 500,
} ...wallet_operations_bitmask
catch (err) );
{ } catch (err) {
let error_string = err.toString(); let error_string = err.toString();
if (error_string.includes("start=")) if (error_string.includes('start=')) {
{ let index = error_string.indexOf('=');
let index = error_string.indexOf("="); start_sequence = error_string.substr(index + 1);
start_sequence = error_string.substr(index+1); if (start_sequence.indexOf('.') > 0)
if (start_sequence.indexOf(".") > 0) start_sequence = start_sequence.substr(
start_sequence = start_sequence.substr(0, start_sequence.length - 1); 0,
try start_sequence.length - 1
{ );
transfer_history = await api.getAccountHistoryAsync(account, start_sequence, 500, ...wallet_operations_bitmask); try {
} transfer_history = await api.getAccountHistoryAsync(
catch (err) account,
{ start_sequence,
console.log("Unable to fetch account history for account: ", account, err); 500,
...wallet_operations_bitmask
);
} catch (err) {
console.log(
'Unable to fetch account history for account: ',
account,
err
);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment