1
0
Fork 0
forked from lthn/blockchain

get alias when overflow

This commit is contained in:
wildkif 2019-04-22 20:44:59 +03:00
parent 1fac00329d
commit 0cf02e3fde
5 changed files with 15 additions and 3 deletions

View file

@ -2088,7 +2088,7 @@ var BackendService = /** @class */ (function () {
};
BackendService.prototype.getWalletAlias = function (address) {
var _this = this;
if (address != null && this.variablesService.daemon_state === 2) {
if (address !== null && this.variablesService.daemon_state === 2) {
if (this.variablesService.aliasesChecked[address] == null) {
this.variablesService.aliasesChecked[address] = {};
if (this.variablesService.aliases.length) {
@ -3219,6 +3219,9 @@ var AppComponent = /** @class */ (function () {
else if (error === 'OVERFLOW') {
_this.variablesService.aliases = [];
_this.variablesService.enableAliasSearch = false;
_this.variablesService.wallets.forEach(function (wallet) {
wallet.alias = _this.backend.getWalletAlias(wallet.address);
});
}
else {
_this.variablesService.enableAliasSearch = true;
@ -4647,6 +4650,9 @@ var OpenWalletModalComponent = /** @class */ (function () {
};
OpenWalletModalComponent.prototype.openWallet = function () {
var _this = this;
if (this.wallets.length === 0) {
return;
}
this.backend.openWallet(this.wallet.path, this.wallet.pass, 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');

File diff suppressed because one or more lines are too long

View file

@ -565,7 +565,7 @@ export class BackendService {
}
getWalletAlias(address) {
if (address != null && this.variablesService.daemon_state === 2) {
if (address !== null && this.variablesService.daemon_state === 2) {
if (this.variablesService.aliasesChecked[address] == null) {
this.variablesService.aliasesChecked[address] = {};
if (this.variablesService.aliases.length) {

View file

@ -551,6 +551,9 @@ export class AppComponent implements OnInit, OnDestroy {
} else if (error === 'OVERFLOW') {
this.variablesService.aliases = [];
this.variablesService.enableAliasSearch = false;
this.variablesService.wallets.forEach(wallet => {
wallet.alias = this.backend.getWalletAlias(wallet.address);
});
} else {
this.variablesService.enableAliasSearch = true;
if (data.aliases && data.aliases.length) {

View file

@ -51,6 +51,9 @@ export class OpenWalletModalComponent implements OnInit {
}
openWallet() {
if (this.wallets.length === 0) {
return;
}
this.backend.openWallet(this.wallet.path, this.wallet.pass, 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');