1
0
Fork 0
forked from lthn/blockchain
* history

* Rebuild
This commit is contained in:
zetov 2020-04-08 21:45:46 +03:00 committed by GitHub
parent ed944436e9
commit ca7899b234
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 15 deletions

View file

@ -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

View file

@ -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')) {

View file

@ -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);
}
}
});
}