1
0
Fork 0
forked from lthn/blockchain

Merge branch 'develop' into release

This commit is contained in:
sowle 2020-07-06 17:25:27 +03:00
commit d5bb280a9a
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
8 changed files with 53 additions and 35 deletions

View file

@ -41,18 +41,6 @@
//#define DISABLE_DEADLOCK_GUARD
#define VALIDATE_MUTEX_IS_FREE(mutex_mame) \
if (mutex_mame.try_lock()) \
{ \
mutex_mame.unlock(); \
return; \
} \
else \
{ \
LOG_ERROR("MUTEX IS NOT FREE ON DESTRUCTOR: " << #mutex_mame); \
}
namespace epee
{
@ -640,13 +628,27 @@ namespace epee
#define DEADLOCK_LOCATION __FILE__ ":" DEADLOCK_STRINGIFY(__LINE__)
/*
/*
We do DEADLOCK_LOCATION and DEADLOCK_FUNCTION_DEF as separate variables passed into deadlock_guard
because in GCC __PRETTY_FUNCTION__ is not a literal (like __FILE__ macro) but const variable, and
can't concatenate it with other macro like we did in DEADLOCK_LOCATION.
*/
#define VALIDATE_MUTEX_IS_FREE(mutex_mame) \
if (mutex_mame.try_lock()) \
{ \
mutex_mame.unlock(); \
return; \
} \
else \
{ \
auto state_str = epee::deadlock_guard_singleton::get_dlg_state(); \
LOG_ERROR("MUTEX IS NOT FREE ON DESTRUCTOR: " << #mutex_mame << ", address:" << (void*)&mutex_mame << ENDL << "DEAD LOCK GUARD state:" << ENDL << state_str); \
}
We do DEADLOCK_LOCATION and DEADLOCK_FUNCTION_DEF as separate variables passed into deadlock_guard
because in GCC __PRETTY_FUNCTION__ is not a literal (like __FILE__ macro) but const variable, and
can't concatenate it with other macro like we did in DEADLOCK_LOCATION.
*/
#define DLG_CRITICAL_REGION_LOCAL_VAR(lock, varname) epee::guarded_critical_region_t<decltype(lock)> varname(lock, DEADLOCK_FUNCTION_DEF, DEADLOCK_LOCATION, #lock, epee::log_space::log_singletone::get_thread_log_prefix())
#define DLG_CRITICAL_REGION_BEGIN_VAR(lock, varname) { epee::guarded_critical_region_t<decltype(lock)> varname(lock, DEADLOCK_FUNCTION_DEF, DEADLOCK_LOCATION, #lock, epee::log_space::log_singletone::get_thread_log_prefix())

View file

@ -225,8 +225,8 @@ var InputValidateDirective = /** @class */ (function () {
}
currentValue = _zero_fill.join('.');
if (currentValue !== originalValue) {
var cursorPosition = event.target.selectionEnd;
event.target.value = currentValue;
var cursorPosition = event.target.selectionEnd;
event.target.setSelectionRange(cursorPosition, cursorPosition);
event.target.dispatchEvent(new Event('input'));
}
@ -5430,7 +5430,9 @@ var LoginComponent = /** @class */ (function () {
_this.backend.storeSecureAppData({ pass: _this.variablesService.appPass });
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.ngZone.run(function () {
_this.router.navigate(['/']);
});
@ -5465,7 +5467,9 @@ var LoginComponent = /** @class */ (function () {
this.backend.checkMasterPassword({ pass: this.variablesService.appPass }, function (status, data) {
if (status) {
_this.variablesService.appLogin = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.ngZone.run(function () {
_this.router.navigate(['/']);
});
@ -5483,7 +5487,9 @@ var LoginComponent = /** @class */ (function () {
if (!data.error_code) {
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.variablesService.appPass = appPass;
var isEmptyObject = Object.keys(data).length === 0 && data.constructor === Object;
if (_this.variablesService.wallets.length) {
@ -7075,7 +7081,7 @@ var SeedPhraseComponent = /** @class */ (function () {
/*! no static exports found */
/***/ (function(module, exports) {
module.exports = "<div class=\"modal\">\n <div class=\"title\">\n <span>{{ 'CONFIRM.TITLE' | translate }}</span>\n </div>\n <div class=\"content\">\n <div class=\"message-container\">\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.SEND' | translate }}</div>\n <div class=\"message-text\">{{ form.get('amount').value }} {{variablesService.defaultCurrency}}</div>\n </div>\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.FROM' | translate }}</div>\n <div class=\"message-text\">{{ variablesService.currentWallet.address }}</div>\n </div>\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.TO' | translate }}</div>\n <div class=\"message-text\">{{ form.get('address').value }}</div>\n </div>\n <ng-container *ngIf=\"form.get('comment').value != ''\">\n <div class=\"message-block\" *ngIf=\"form.get('comment').value != null\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.COMMENT' | translate }}</div>\n <div class=\"message-text\">{{ form.get('comment').value }}</div>\n </div> \n </ng-container> \n </div>\n </div>\n <div class=\"wrapper-buttons\">\n <button type=\"button\" class=\"blue-button\" (click)=\"confirm()\">{{ 'CONFIRM.BUTTON_CONFIRM' | translate }}</button>\n <button type=\"button\" class=\"blue-button\" (click)=\"onClose()\">{{ 'CONFIRM.BUTTON_CANCEL' | translate }}</button>\n </div>\n</div>\n"
module.exports = "<div class=\"modal\">\n <div class=\"title\">\n <span>{{ 'CONFIRM.TITLE' | translate }}</span>\n </div>\n <div class=\"content\">\n <div class=\"message-container\">\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.SEND' | translate }}</div>\n <div class=\"message-text\">{{ +form.get('amount').value }} {{variablesService.defaultCurrency}}</div>\n </div>\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.FROM' | translate }}</div>\n <div class=\"message-text\">{{ variablesService.currentWallet.address }}</div>\n </div>\n <div class=\"message-block\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.TO' | translate }}</div>\n <div class=\"message-text\">{{ form.get('address').value }}</div>\n </div>\n <ng-container *ngIf=\"form.get('comment').value != ''\">\n <div class=\"message-block\" *ngIf=\"form.get('comment').value != null\">\n <div class=\"message-label\">{{ 'CONFIRM.MESSAGE.COMMENT' | translate }}</div>\n <div class=\"message-text\">{{ form.get('comment').value }}</div>\n </div>\n </ng-container>\n </div>\n </div>\n <div class=\"wrapper-buttons\">\n <button type=\"button\" class=\"blue-button\" (click)=\"confirm()\">{{ 'CONFIRM.BUTTON_CONFIRM' | translate }}</button>\n <button type=\"button\" class=\"blue-button\" (click)=\"onClose()\">{{ 'CONFIRM.BUTTON_CANCEL' | translate }}</button>\n </div>\n</div>\n"
/***/ }),
@ -7608,7 +7614,9 @@ var SettingsComponent = /** @class */ (function () {
_this.backend.storeSecureAppData({ pass: _this.variablesService.appPass });
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
}
else {
console.log(data['error_code']);
@ -7622,7 +7630,7 @@ var SettingsComponent = /** @class */ (function () {
}
};
SettingsComponent.prototype.onLockChange = function () {
if (this.variablesService.appLogin) {
if (this.variablesService.appLogin && this.variablesService.settings.appLockTime) {
this.variablesService.restartCountdown();
}
this.backend.storeAppData();

File diff suppressed because one or more lines are too long

View file

@ -50,8 +50,8 @@ export class InputValidateDirective {
}
currentValue = _zero_fill.join('.');
if (currentValue !== originalValue) {
const cursorPosition = (<HTMLInputElement>event.target).selectionEnd;
(<HTMLInputElement>event.target).value = currentValue;
const cursorPosition = (<HTMLInputElement>event.target).selectionEnd;
(<HTMLInputElement>event.target).setSelectionRange(cursorPosition, cursorPosition);
(<HTMLInputElement>event.target).dispatchEvent(new Event('input'));
}

View file

@ -60,7 +60,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backend.storeSecureAppData({pass: this.variablesService.appPass});
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.ngZone.run(() => {
this.router.navigate(['/']);
});
@ -95,7 +97,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backend.checkMasterPassword({pass: this.variablesService.appPass}, (status, data) => {
if (status) {
this.variablesService.appLogin = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.ngZone.run(() => {
this.router.navigate(['/']);
});
@ -112,7 +116,9 @@ export class LoginComponent implements OnInit, OnDestroy {
if (!data.error_code) {
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.variablesService.appPass = appPass;
const isEmptyObject = Object.keys(data).length === 0 && data.constructor === Object;

View file

@ -6,7 +6,7 @@
<div class="message-container">
<div class="message-block">
<div class="message-label">{{ 'CONFIRM.MESSAGE.SEND' | translate }}</div>
<div class="message-text">{{ form.get('amount').value }} {{variablesService.defaultCurrency}}</div>
<div class="message-text">{{ +form.get('amount').value }} {{variablesService.defaultCurrency}}</div>
</div>
<div class="message-block">
<div class="message-label">{{ 'CONFIRM.MESSAGE.FROM' | translate }}</div>
@ -20,8 +20,8 @@
<div class="message-block" *ngIf="form.get('comment').value != null">
<div class="message-label">{{ 'CONFIRM.MESSAGE.COMMENT' | translate }}</div>
<div class="message-text">{{ form.get('comment').value }}</div>
</div>
</ng-container>
</div>
</ng-container>
</div>
</div>
<div class="wrapper-buttons">

View file

@ -153,7 +153,9 @@ export class SettingsComponent implements OnInit {
this.backend.storeSecureAppData({pass: this.variablesService.appPass});
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
} else {
console.log(data['error_code']);
}
@ -166,7 +168,7 @@ export class SettingsComponent implements OnInit {
}
onLockChange() {
if (this.variablesService.appLogin) {
if (this.variablesService.appLogin && this.variablesService.settings.appLockTime) {
this.variablesService.restartCountdown();
}
this.backend.storeAppData();

View file

@ -8,6 +8,6 @@
#define PROJECT_REVISION "7"
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
#define PROJECT_VERSION_BUILD_NO 92
#define PROJECT_VERSION_BUILD_NO 93
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"