1
0
Fork 0
forked from lthn/blockchain

Pagination (#144)

* Pagination + html

* offset + rebuild

* open wallet

* conflict
This commit is contained in:
zetov 2019-12-05 22:48:18 +02:00 committed by cryptozoidberg
parent a199d87163
commit 45c61560ba
6 changed files with 15 additions and 13 deletions

View file

@ -2089,10 +2089,11 @@ var BackendService = /** @class */ (function () {
};
this.runCommand('generate_wallet', params, callback);
};
BackendService.prototype.openWallet = function (path, pass, testEmpty, callback) {
BackendService.prototype.openWallet = function (path, pass, txs_to_return, testEmpty, callback) {
var params = {
path: path,
pass: pass
pass: pass,
txs_to_return: txs_to_return
};
params['testEmpty'] = !!(testEmpty);
this.runCommand('open_wallet', params, callback);
@ -5460,7 +5461,7 @@ var LoginComponent = /** @class */ (function () {
var openWallets = 0;
var runWallets = 0;
walletData.forEach(function (wallet, wallet_index) {
_this.backend.openWallet(wallet.path, wallet.pass, true, function (open_status, open_data, open_error) {
_this.backend.openWallet(wallet.path, wallet.pass, _this.variablesService.count, true, function (open_status, open_data, open_error) {
if (open_status || open_error === 'FILE_RESTORED') {
openWallets++;
_this.ngZone.run(function () {
@ -5801,7 +5802,7 @@ var OpenWalletModalComponent = /** @class */ (function () {
if (this.wallets.length) {
this.wallet = this.wallets[0];
this.wallet.pass = '';
this.backend.openWallet(this.wallet.path, '', true, function (status, data, error) {
this.backend.openWallet(this.wallet.path, '', this.variablesService.count, true, function (status, data, error) {
if (error === 'FILE_NOT_FOUND') {
_this.wallet.notFound = true;
}
@ -5819,7 +5820,7 @@ var OpenWalletModalComponent = /** @class */ (function () {
if (this.wallets.length === 0) {
return;
}
this.backend.openWallet(this.wallet.path, this.wallet.pass, false, function (open_status, open_data, open_error) {
this.backend.openWallet(this.wallet.path, this.wallet.pass, this.variablesService.count, false, function (open_status, open_data, open_error) {
if (open_error && open_error === 'FILE_NOT_FOUND') {
var error_translate = _this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND1');
error_translate += ':<br>' + _this.wallet.path;
@ -6000,7 +6001,7 @@ var OpenWalletComponent = /** @class */ (function () {
OpenWalletComponent.prototype.openWallet = function () {
var _this = this;
if (this.openForm.valid && this.openForm.get('name').value.length <= this.variablesService.maxWalletNameLength) {
this.backend.openWallet(this.filePath, this.openForm.get('password').value, false, function (open_status, open_data, open_error) {
this.backend.openWallet(this.filePath, this.openForm.get('password').value, this.variablesService.count, false, function (open_status, open_data, open_error) {
if (open_error && open_error === 'FILE_NOT_FOUND') {
var error_translate = _this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND1');
error_translate += ':<br>' + _this.filePath;

File diff suppressed because one or more lines are too long

View file

@ -374,10 +374,11 @@ export class BackendService {
this.runCommand('generate_wallet', params, callback);
}
openWallet(path, pass, testEmpty, callback) {
openWallet(path, pass, txs_to_return, testEmpty, callback) {
const params = {
path: path,
pass: pass
pass: pass,
txs_to_return: txs_to_return
};
params['testEmpty'] = !!(testEmpty);
this.runCommand('open_wallet', params, callback);

View file

@ -155,7 +155,7 @@ export class LoginComponent implements OnInit, OnDestroy {
let openWallets = 0;
let runWallets = 0;
walletData.forEach((wallet, wallet_index) => {
this.backend.openWallet(wallet.path, wallet.pass, true, (open_status, open_data, open_error) => {
this.backend.openWallet(wallet.path, wallet.pass, this.variablesService.count, true, (open_status, open_data, open_error) => {
if (open_status || open_error === 'FILE_RESTORED') {
openWallets++;
this.ngZone.run(() => {

View file

@ -36,7 +36,7 @@ export class OpenWalletModalComponent implements OnInit {
this.wallet = this.wallets[0];
this.wallet.pass = '';
this.backend.openWallet(this.wallet.path, '', true, (status, data, error) => {
this.backend.openWallet(this.wallet.path, '', this.variablesService.count, true, (status, data, error) => {
if (error === 'FILE_NOT_FOUND') {
this.wallet.notFound = true;
}
@ -54,7 +54,7 @@ export class OpenWalletModalComponent implements OnInit {
if (this.wallets.length === 0) {
return;
}
this.backend.openWallet(this.wallet.path, this.wallet.pass, false, (open_status, open_data, open_error) => {
this.backend.openWallet(this.wallet.path, this.wallet.pass, this.variablesService.count, false, (open_status, open_data, open_error) => {
if (open_error && open_error === 'FILE_NOT_FOUND') {
let error_translate = this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND1');
error_translate += ':<br>' + this.wallet.path;

View file

@ -61,7 +61,7 @@ export class OpenWalletComponent implements OnInit, OnDestroy {
openWallet() {
if (this.openForm.valid && this.openForm.get('name').value.length <= this.variablesService.maxWalletNameLength) {
this.backend.openWallet(this.filePath, this.openForm.get('password').value, false, (open_status, open_data, open_error) => {
this.backend.openWallet(this.filePath, this.openForm.get('password').value, this.variablesService.count, false, (open_status, open_data, open_error) => {
if (open_error && open_error === 'FILE_NOT_FOUND') {
let error_translate = this.translate.instant('OPEN_WALLET.FILE_NOT_FOUND1');
error_translate += ':<br>' + this.filePath;