1
0
Fork 0
forked from lthn/blockchain

Small bug when sending zano without leading 0 for decimal part fixed #190

* fixed issue when user at first typing '.' in field amount

* show amount value in modal without 0
This commit is contained in:
arthurest 2020-07-06 18:21:59 +04:00 committed by GitHub
parent 5903cc36aa
commit 4c908e5890
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

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'));
}
@ -7081,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"
/***/ }),

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

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