From b24648de0978e4d2593321cd3cbb1ab55d7db0e9 Mon Sep 17 00:00:00 2001 From: Ivan Belyakov Date: Mon, 15 May 2023 15:58:39 +0200 Subject: [PATCH] fix(desktop/wallet): fixed regex for derivation path as Qt 5.15 regex on Linux does not support named groups --- .../addaccount/panels/DerivationPathInput/Controller.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Wallet/addaccount/panels/DerivationPathInput/Controller.qml b/ui/app/AppLayouts/Wallet/addaccount/panels/DerivationPathInput/Controller.qml index 9b2d7428a6..1153866496 100644 --- a/ui/app/AppLayouts/Wallet/addaccount/panels/DerivationPathInput/Controller.qml +++ b/ui/app/AppLayouts/Wallet/addaccount/panels/DerivationPathInput/Controller.qml @@ -24,7 +24,8 @@ Item { id: d // d flag and named capture groups not supported in Qt 5.15. Use multiple regexes instead - readonly property var derivationPathRegex: /^m\/44[’|']\/?(?:(?.*?)[’|'])?(?.*?)(?:\/(?.*?)[’|']?)?(?:\/(?.*?))?((?:\/.*?)?)$/ + // Captured groups: ? ? ? ? + readonly property var derivationPathRegex: /^m\/44[’|']\/?(?:(.*?)[’|'])?(.*?)(?:\/(.*?)[’|']?)?(?:\/(.*?))?((?:\/.*?)?)$/ // The expected characters before each group. Workaround to missing capture group offsets in Qt 5.15 readonly property var offsets: [6, 0, 2, 2]