fix(Syncing): Update to newer version of status-go local pairing (#9992)

This commit is contained in:
Igor Sirotin 2023-03-24 03:07:30 +03:00 committed by GitHub
parent 06ca722cb7
commit e4f6724fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 12 deletions

View File

@ -337,6 +337,7 @@ QtObject:
result["Rendezvous"] = newJBool(false)
result["KeyStoreDir"] = newJString(self.keyStoreDir.replace(main_constants.STATUSGODIR, ""))
result["RootDataDir"] = newJString(main_constants.STATUSGODIR)
proc setLocalAccountSettingsFile(self: Service) =
if(main_constants.IS_MACOS and self.getLoggedInAccount.isValid()):
@ -747,3 +748,6 @@ QtObject:
except Exception as e:
error "error: ", procName="verifyPassword", errName = e.name, errDesription = e.msg
return false
proc getKdfIterations*(self: Service): int =
return KDF_ITERATIONS

View File

@ -165,24 +165,31 @@ QtObject:
proc getConnectionStringForBootstrappingAnotherDevice*(self: Service, keyUid: string, password: string): string =
let configJSON = %* {
"keyUID": keyUid,
"senderConfig": %* {
"keystorePath": joinPath(main_constants.ROOTKEYSTOREDIR, keyUid),
"deviceType": hostOs,
"keyUID": keyUid,
"password": utils.hashPassword(password),
},
"serverConfig": %* {
"timeout": 5 * 60 * 1000,
}
}
self.localPairingStatus.mode = LocalPairingMode.BootstrapingOtherDevice
return status_go.getConnectionStringForBootstrappingAnotherDevice($configJSON)
proc inputConnectionStringForBootstrapping*(self: Service, connectionString: string): string =
let installationId = $genUUID()
let nodeConfigJson = self.accountsService.getDefaultNodeConfig(installationId)
let configJSON = %* {
"receiverConfig": %* {
"keystorePath": main_constants.ROOTKEYSTOREDIR,
"nodeConfig": nodeConfigJson,
"deviceType" : hostOs,
"RootDataDir": main_constants.STATUSGODIR
"nodeConfig": nodeConfigJson,
"kdfIterations": self.accountsService.getKdfIterations(),
"settingCurrentNetwork": ""
},
"clientConfig": %* {}
}
self.localPairingStatus.mode = LocalPairingMode.BootstrapingThisDevice

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit a3f1a84d291749d32408f340d331877555cee5c1
Subproject commit 7cd7430d3141b08f7c455d7918f4160ea8fd0559