forked from lthn/blockchain
Merge remote-tracking branch 'origin/frontend' into develop
This commit is contained in:
commit
8dfb76c5ec
4 changed files with 16 additions and 3 deletions
|
|
@ -1875,7 +1875,7 @@ var BackendService = /** @class */ (function () {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
var wallets = [];
|
var wallets = [];
|
||||||
this.variablesService.wallets.forEach(function (wallet) {
|
this.variablesService.wallets.forEach(function (wallet) {
|
||||||
wallets.push({ name: wallet.name, pass: wallet.pass, path: wallet.path });
|
wallets.push({ name: wallet.name, pass: wallet.pass, path: wallet.path, staking: wallet.staking });
|
||||||
});
|
});
|
||||||
this.backendObject['store_secure_app_data'](JSON.stringify(wallets), this.variablesService.appPass, function (dataStore) {
|
this.backendObject['store_secure_app_data'](JSON.stringify(wallets), this.variablesService.appPass, function (dataStore) {
|
||||||
_this.backendCallback(dataStore, {}, callback, 'store_secure_app_data');
|
_this.backendCallback(dataStore, {}, callback, 'store_secure_app_data');
|
||||||
|
|
@ -4417,6 +4417,13 @@ var LoginComponent = /** @class */ (function () {
|
||||||
_this.ngZone.run(function () {
|
_this.ngZone.run(function () {
|
||||||
var new_wallet = new _helpers_models_wallet_model__WEBPACK_IMPORTED_MODULE_6__["Wallet"](open_data.wallet_id, wallet.name, wallet.pass, open_data['wi'].path, open_data['wi'].address, open_data['wi'].balance, open_data['wi'].unlocked_balance, open_data['wi'].mined_total, open_data['wi'].tracking_hey);
|
var new_wallet = new _helpers_models_wallet_model__WEBPACK_IMPORTED_MODULE_6__["Wallet"](open_data.wallet_id, wallet.name, wallet.pass, open_data['wi'].path, open_data['wi'].address, open_data['wi'].balance, open_data['wi'].unlocked_balance, open_data['wi'].mined_total, open_data['wi'].tracking_hey);
|
||||||
new_wallet.alias = _this.backend.getWalletAlias(new_wallet.address);
|
new_wallet.alias = _this.backend.getWalletAlias(new_wallet.address);
|
||||||
|
if (wallet.staking) {
|
||||||
|
new_wallet.staking = true;
|
||||||
|
_this.backend.startPosMining(new_wallet.wallet_id);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
new_wallet.staking = false;
|
||||||
|
}
|
||||||
if (open_data.recent_history && open_data.recent_history.history) {
|
if (open_data.recent_history && open_data.recent_history.history) {
|
||||||
new_wallet.prepareHistory(open_data.recent_history.history);
|
new_wallet.prepareHistory(open_data.recent_history.history);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -308,7 +308,7 @@ export class BackendService {
|
||||||
storeSecureAppData(callback?) {
|
storeSecureAppData(callback?) {
|
||||||
const wallets = [];
|
const wallets = [];
|
||||||
this.variablesService.wallets.forEach((wallet) => {
|
this.variablesService.wallets.forEach((wallet) => {
|
||||||
wallets.push({name: wallet.name, pass: wallet.pass, path: wallet.path});
|
wallets.push({name: wallet.name, pass: wallet.pass, path: wallet.path, staking: wallet.staking});
|
||||||
});
|
});
|
||||||
this.backendObject['store_secure_app_data'](JSON.stringify(wallets), this.variablesService.appPass, (dataStore) => {
|
this.backendObject['store_secure_app_data'](JSON.stringify(wallets), this.variablesService.appPass, (dataStore) => {
|
||||||
this.backendCallback(dataStore, {}, callback, 'store_secure_app_data');
|
this.backendCallback(dataStore, {}, callback, 'store_secure_app_data');
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,12 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||||
open_data['wi'].tracking_hey
|
open_data['wi'].tracking_hey
|
||||||
);
|
);
|
||||||
new_wallet.alias = this.backend.getWalletAlias(new_wallet.address);
|
new_wallet.alias = this.backend.getWalletAlias(new_wallet.address);
|
||||||
|
if (wallet.staking) {
|
||||||
|
new_wallet.staking = true;
|
||||||
|
this.backend.startPosMining(new_wallet.wallet_id);
|
||||||
|
} else {
|
||||||
|
new_wallet.staking = false;
|
||||||
|
}
|
||||||
if (open_data.recent_history && open_data.recent_history.history) {
|
if (open_data.recent_history && open_data.recent_history.history) {
|
||||||
new_wallet.prepareHistory(open_data.recent_history.history);
|
new_wallet.prepareHistory(open_data.recent_history.history);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue