Utils.isCommunityPublicKey moved to UtilsStore
This commit is contained in:
parent
094114a77a
commit
356275f2b3
|
@ -6,6 +6,7 @@ import QtQml.Models 2.15
|
|||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
import shared.stores 1.0
|
||||
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
|
@ -18,6 +19,8 @@ StatusDialog {
|
|||
id: root
|
||||
|
||||
property CommunitiesStores.CommunitiesStore store
|
||||
property UtilsStore utilsStore
|
||||
|
||||
property alias text: keyInput.text
|
||||
|
||||
signal joinCommunityRequested(string communityId, var communityDetails)
|
||||
|
@ -53,7 +56,7 @@ StatusDialog {
|
|||
}
|
||||
return linkData.communityId
|
||||
}
|
||||
if (!Utils.isCommunityPublicKey(inputKey))
|
||||
if (!root.utilsStore.isCommunityPublicKey(inputKey))
|
||||
return ""
|
||||
if (!Utils.isCompressedPubKey(inputKey))
|
||||
return inputKey
|
||||
|
|
|
@ -15,4 +15,9 @@ QtObject {
|
|||
return (Utils.startsWith0x(value) && Utils.isHex(value) && value.length === 132)
|
||||
|| d.globalUtilsInst.isCompressedPubKey(value)
|
||||
}
|
||||
|
||||
function isCommunityPublicKey(value) {
|
||||
return (Utils.startsWith0x(value) && Utils.isHex(value) && value.length === Constants.communityIdLength)
|
||||
|| d.globalUtilsInst.isCompressedPubKey(value)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -725,10 +725,6 @@ QtObject {
|
|||
return (startsWith0x(value) && isHex(value) && value.length === 132) || globalUtilsInst.isCompressedPubKey(value)
|
||||
}
|
||||
|
||||
function isCommunityPublicKey(value) {
|
||||
return (startsWith0x(value) && isHex(value) && value.length === Constants.communityIdLength) || globalUtilsInst.isCompressedPubKey(value)
|
||||
}
|
||||
|
||||
function isCompressedPubKey(pubKey) {
|
||||
return globalUtilsInst.isCompressedPubKey(pubKey)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue