forked from lthn/blockchain
parent
ed944436e9
commit
ca7899b234
4 changed files with 25 additions and 15 deletions
|
|
@ -3556,13 +3556,15 @@ var AppComponent = /** @class */ (function () {
|
|||
}
|
||||
var tr_exists = wallet.excluded_history.some(function (elem) { return elem.tx_hash === tr_info.tx_hash; });
|
||||
tr_exists = (!tr_exists) ? wallet.history.some(function (elem) { return elem.tx_hash === tr_info.tx_hash; }) : tr_exists;
|
||||
wallet.prepareHistory([tr_info]);
|
||||
if (wallet.restore) {
|
||||
wallet.total_history_item = wallet.history.length;
|
||||
wallet.totalPages = Math.ceil(wallet.total_history_item / _this.variablesService.count);
|
||||
wallet.totalPages > _this.variablesService.maxPages
|
||||
? wallet.pages = new Array(5).fill(1).map(function (value, index) { return value + index; })
|
||||
: wallet.pages = new Array(wallet.totalPages).fill(1).map(function (value, index) { return value + index; });
|
||||
if (wallet.currentPage === 1) {
|
||||
wallet.prepareHistory([tr_info]);
|
||||
if (wallet.restore) {
|
||||
wallet.total_history_item = wallet.history.length;
|
||||
wallet.totalPages = Math.ceil(wallet.total_history_item / _this.variablesService.count);
|
||||
wallet.totalPages > _this.variablesService.maxPages
|
||||
? wallet.pages = new Array(5).fill(1).map(function (value, index) { return value + index; })
|
||||
: wallet.pages = new Array(wallet.totalPages).fill(1).map(function (value, index) { return value + index; });
|
||||
}
|
||||
}
|
||||
if (tr_info.hasOwnProperty('contract')) {
|
||||
var exp_med_ts = _this.variablesService.exp_med_ts;
|
||||
|
|
@ -8821,6 +8823,9 @@ var WalletComponent = /** @class */ (function () {
|
|||
_this.variablesService.currentWallet.restore = false;
|
||||
_this.variablesService.currentWallet.total_history_item = data.total_history_items;
|
||||
_this.variablesService.currentWallet.prepareHistory(data.history);
|
||||
if (_this.variablesService.currentWallet.currentPage === 1 && data.unconfirmed) {
|
||||
_this.variablesService.currentWallet.prepareHistory(data.unconfirmed);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -265,13 +265,15 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
let tr_exists = wallet.excluded_history.some(elem => elem.tx_hash === tr_info.tx_hash);
|
||||
tr_exists = (!tr_exists) ? wallet.history.some(elem => elem.tx_hash === tr_info.tx_hash) : tr_exists;
|
||||
|
||||
wallet.prepareHistory([tr_info]);
|
||||
if (wallet.restore) {
|
||||
wallet.total_history_item = wallet.history.length;
|
||||
wallet.totalPages = Math.ceil( wallet.total_history_item / this.variablesService.count);
|
||||
wallet.totalPages > this.variablesService.maxPages
|
||||
? wallet.pages = new Array(5).fill(1).map((value, index) => value + index)
|
||||
: wallet.pages = new Array(wallet.totalPages).fill(1).map((value, index) => value + index);
|
||||
if (wallet.currentPage === 1) {
|
||||
wallet.prepareHistory([tr_info]);
|
||||
if (wallet.restore) {
|
||||
wallet.total_history_item = wallet.history.length;
|
||||
wallet.totalPages = Math.ceil( wallet.total_history_item / this.variablesService.count);
|
||||
wallet.totalPages > this.variablesService.maxPages
|
||||
? wallet.pages = new Array(5).fill(1).map((value, index) => value + index)
|
||||
: wallet.pages = new Array(wallet.totalPages).fill(1).map((value, index) => value + index);
|
||||
}
|
||||
}
|
||||
|
||||
if (tr_info.hasOwnProperty('contract')) {
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@ export class WalletComponent implements OnInit, OnDestroy {
|
|||
this.variablesService.currentWallet.restore = false;
|
||||
this.variablesService.currentWallet.total_history_item = data.total_history_items;
|
||||
this.variablesService.currentWallet.prepareHistory(data.history);
|
||||
if (this.variablesService.currentWallet.currentPage === 1 && data.unconfirmed) {
|
||||
this.variablesService.currentWallet.prepareHistory(data.unconfirmed);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue