fix(communities) validate privkey when importing a community

Fixes #5346
This commit is contained in:
Richard Ramos 2022-05-16 09:13:40 -04:00 committed by Iuri Matias
parent 56b182c50b
commit 8143d3bf52
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,8 @@ StatusModal {
property var store
function validate(communityKey) {
return communityKey.trim() !== ""
const bytes32Len = 66;
return communityKey.length === bytes32Len && Utils.isHex(communityKey) && Utils.startsWith0x(communityKey)
}
//% "Access existing community"