fix: keycard signature add 27

This commit is contained in:
Igor Sirotin 2024-07-17 09:37:48 +01:00
parent e4f6830311
commit 423c3e0256
2 changed files with 4 additions and 2 deletions

View File

@ -736,10 +736,12 @@ method onDataSigned*(self: Module, keyUid: string, path: string, r: string, s: s
# being here is not an error
return
let vFixed = toLower(uint8(parseUint(v) + 27).toHex())
for address, details in self.joiningCommunityDetails.addressesToShare.pairs:
if details.keyUid != keyUid or details.path != path:
continue
self.joiningCommunityDetails.addressesToShare[address].signature = "0x" & r & s & v
self.joiningCommunityDetails.addressesToShare[address].signature = "0x" & r & s & vFixed
break
self.signSharedAddressesForKeypair(keyUid, pin)

View File

@ -96,7 +96,7 @@ QtObject:
if keyUid.len == 0 or path.len == 0 or r.len == 0 or s.len == 0 or v.len == 0 or pin.len == 0:
error "invalid data signed"
return
let signature = "0x" & r & s & v
let signature = "0x" & r & s & v // FIXME
if identifier == UNIQUE_WC_SESSION_REQUEST_SIGNING_IDENTIFIER:
self.finishSessionRequest(signature)
elif identifier == UNIQUE_WC_AUTH_REQUEST_SIGNING_IDENTIFIER: