Skip to content

Commit

Permalink
Merge pull request #102 from torusresearch/fix_double_hex_signature
Browse files Browse the repository at this point in the history
fix: remove double hex of token signature
  • Loading branch information
metalurgical authored Jul 30, 2024
2 parents 710a851 + 7e1c6bc commit 303dc2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/TorusUtils/Helpers/NodeUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ internal class NodeUtils {
sessionTokenDatas.append(nil)
} else {
if Data(hexString: item!) != nil {
sessionTokenDatas.append(SessionToken(token: Data(hexString: item!)!.base64EncodedString(), signature: sessionTokenSigs[i]!.data(using: .utf8)!.hexString, node_pubx: shareResponses[i].nodePubX, node_puby: shareResponses[i].nodePubY))
sessionTokenDatas.append(SessionToken(token: Data(hexString: item!)!.base64EncodedString(), signature: sessionTokenSigs[i]!, node_pubx: shareResponses[i].nodePubX, node_puby: shareResponses[i].nodePubY))
} else {
sessionTokenDatas.append(SessionToken(token: item!, signature: sessionTokenSigs[i]!.data(using: .utf8)!.hexString, node_pubx: shareResponses[i].nodePubX, node_puby: shareResponses[i].nodePubY))
sessionTokenDatas.append(SessionToken(token: item!, signature: sessionTokenSigs[i]!, node_pubx: shareResponses[i].nodePubX, node_puby: shareResponses[i].nodePubY))
}
}
}
Expand Down

0 comments on commit 303dc2c

Please sign in to comment.