openalias: handle address validation correctly

This commit is contained in:
mmbyday
2018-12-19 13:37:52 -08:00
parent 7c0a557e62
commit 67787421e1
3 changed files with 12 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ TextArea {
if(addressValidation){
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
textArea.text = textArea.text.replace(/[^a-z0-9.@]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype);
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text);
if(!address_ok) error = true;
else error = false;
TextArea.cursorPosition = textArea.text.length;