mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-27 23:05:57 +00:00
chore(@desktop/syncing): sending pairings.json
file content removed from local pairing (maintained on the status-go side)
This commit is contained in:
parent
243b70a3eb
commit
0d2c68411b
@ -81,16 +81,6 @@ QtObject:
|
|||||||
self.localPairingStatus.update(data)
|
self.localPairingStatus.update(data)
|
||||||
self.events.emit(SIGNAL_LOCAL_PAIRING_STATUS_UPDATE, self.localPairingStatus)
|
self.events.emit(SIGNAL_LOCAL_PAIRING_STATUS_UPDATE, self.localPairingStatus)
|
||||||
|
|
||||||
proc createKeycardPairingFile(data: string) =
|
|
||||||
var file = open(main_constants.KEYCARDPAIRINGDATAFILE, fmWrite)
|
|
||||||
if file == nil:
|
|
||||||
error "failed to open local keycard pairing file"
|
|
||||||
return
|
|
||||||
try:
|
|
||||||
file.write(data)
|
|
||||||
except:
|
|
||||||
error "failed to write data to local keycard pairing file"
|
|
||||||
file.close()
|
|
||||||
|
|
||||||
proc doConnect(self: Service) =
|
proc doConnect(self: Service) =
|
||||||
self.events.on(SignalType.Message.event) do(e:Args):
|
self.events.on(SignalType.Message.event) do(e:Args):
|
||||||
@ -103,8 +93,6 @@ QtObject:
|
|||||||
self.events.on(SignalType.LocalPairing.event) do(e:Args):
|
self.events.on(SignalType.LocalPairing.event) do(e:Args):
|
||||||
let signalData = LocalPairingSignal(e)
|
let signalData = LocalPairingSignal(e)
|
||||||
if self.localPairingStatus.pairingType == PairingType.AppSync:
|
if self.localPairingStatus.pairingType == PairingType.AppSync:
|
||||||
if not signalData.accountData.isNil and signalData.accountData.keycardPairings.len > 0:
|
|
||||||
createKeycardPairingFile(signalData.accountData.keycardPairings)
|
|
||||||
let data = LocalPairingEventArgs(
|
let data = LocalPairingEventArgs(
|
||||||
eventType: signalData.eventType,
|
eventType: signalData.eventType,
|
||||||
action: signalData.action,
|
action: signalData.action,
|
||||||
@ -207,10 +195,8 @@ QtObject:
|
|||||||
let keyUid = singletonInstance.userProfile.getKeyUid()
|
let keyUid = singletonInstance.userProfile.getKeyUid()
|
||||||
let keycardUser = singletonInstance.userProfile.getIsKeycardUser()
|
let keycardUser = singletonInstance.userProfile.getIsKeycardUser()
|
||||||
var finalPassword = utils.hashPassword(password)
|
var finalPassword = utils.hashPassword(password)
|
||||||
var keycardPairingJsonString = ""
|
|
||||||
if keycardUser:
|
if keycardUser:
|
||||||
finalPassword = password
|
finalPassword = password
|
||||||
keycardPairingJsonString = readFile(main_constants.KEYCARDPAIRINGDATAFILE)
|
|
||||||
|
|
||||||
let configJSON = %* {
|
let configJSON = %* {
|
||||||
"senderConfig": %* {
|
"senderConfig": %* {
|
||||||
@ -219,7 +205,6 @@ QtObject:
|
|||||||
"keyUID": keyUid,
|
"keyUID": keyUid,
|
||||||
"password": finalPassword,
|
"password": finalPassword,
|
||||||
"chatKey": chatKey,
|
"chatKey": chatKey,
|
||||||
"keycardPairings": keycardPairingJsonString
|
|
||||||
},
|
},
|
||||||
"serverConfig": %* {
|
"serverConfig": %* {
|
||||||
"timeout": 5 * 60 * 1000,
|
"timeout": 5 * 60 * 1000,
|
||||||
|
2
vendor/status-go
vendored
2
vendor/status-go
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6894295ac3b21a2739e68c7a8bce54f70a52854a
|
Subproject commit 3bacb84a02406da295406acb9d8a9f9c82a25808
|
Loading…
x
Reference in New Issue
Block a user