Commit 2f348fc7 authored by Pieterjan Vanhoof's avatar Pieterjan Vanhoof Committed by GitHub

Merge pull request #340 from stratisproject/ui

Adjust recovery error message, allow amounts without a leading zero
parents b3bf70e0 41384343
...@@ -178,7 +178,7 @@ export class RecoverComponent implements OnInit { ...@@ -178,7 +178,7 @@ export class RecoverComponent implements OnInit {
private AlertIfNeeded(bitcoinErrorMessage: string, stratisErrorMessage: string) { private AlertIfNeeded(bitcoinErrorMessage: string, stratisErrorMessage: string) {
if(bitcoinErrorMessage !== "" || stratisErrorMessage !== "") { if(bitcoinErrorMessage !== "" || stratisErrorMessage !== "") {
let errorMessage = "Bitcoin wallet recovery:\n" + bitcoinErrorMessage + "\n\nStratis wallet recovery:\n" + stratisErrorMessage; let errorMessage = "<strong>Bitcoin wallet recovery:</strong><br>" + bitcoinErrorMessage + "<br><br><strong>Stratis wallet recovery:</strong><br>" + stratisErrorMessage;
this.genericModalService.openModal(null, errorMessage); this.genericModalService.openModal(null, errorMessage);
} }
} }
......
...@@ -39,8 +39,8 @@ export class SendComponent implements OnInit { ...@@ -39,8 +39,8 @@ export class SendComponent implements OnInit {
private buildSendForm(): void { private buildSendForm(): void {
this.sendForm = this.fb.group({ this.sendForm = this.fb.group({
"address": ["", Validators.required], "address": ["", Validators.required],
"amount": ["", Validators.compose([Validators.required, Validators.pattern(/^[0-9]+(\.[0-9]{0,8})?$/)])], // "amount": ["", Validators.compose([Validators.required, Validators.pattern(/^[0-9]+(\.[0-9]{0,8})?$/)])],
//"amount": ["", Validators.compose([Validators.required, Validators.pattern(/^([0-9]+)?(\.[0-9]{0,8})?$/)])], "amount": ["", Validators.compose([Validators.required, Validators.pattern(/^([0-9]+)?(\.[0-9]{0,8})?$/)])],
"fee": ["medium", Validators.required], "fee": ["medium", Validators.required],
"password": ["", Validators.required] "password": ["", Validators.required]
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment