Skip to content

Commit

Permalink
gh-716 make adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Scherbovich committed Nov 26, 2020
1 parent 051838b commit 2175b72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Expand Up @@ -44,15 +44,15 @@ struct RegisterNotificationTokenRequest: JSONRequest {
let string = [
"gnosis-safe",
self.uuid,
self.safes.reduce("") { $0 + $1 },
self.safes.joined(),
self.cloudMessagingToken,
self.bundle,
self.version,
self.deviceType,
self.buildNumber,
self.timestamp
]
.reduce("") { $0 + $1 }
.joined()

if let signature = try? Signer.sign(string).value {
self.signatures = [signature]
Expand Down
2 changes: 1 addition & 1 deletion Multisig/Logic/Models/Signer.swift
Expand Up @@ -22,7 +22,7 @@ class Signer {
/// - Throws: errors during sisgning process
/// - Returns: Signature object containing hex(r) hex(s) hex(v + 27) as one strig of secp256k1 signature
static func sign(_ string: String) throws -> Signature {
let hash = EthHasher.hash(string.data(using: .ascii)!)
let hash = EthHasher.hash(string.data(using: .utf8)!)
return try sign(hash: hash)
}

Expand Down
4 changes: 3 additions & 1 deletion Multisig/UI/App/RemoteNotificationHandler.swift
Expand Up @@ -66,7 +66,9 @@ class RemoteNotificationHandler {

func safeAdded(address: Address) {
logDebug("Safe added: \(address)")
if authorizationStatus != nil {
if authorizationStatus == nil {
requestUserPermissionAndRegister()
} else {
register(addresses: [address])
}
}
Expand Down

0 comments on commit 2175b72

Please sign in to comment.