Browse Source

Merge pull request #493 from gabrielbazan7/fix/hashToHex

hash to hex
activeAddress
Matias Alejo Garcia 9 years ago
parent
commit
897c73bf1a
  1. 4
      lib/pushnotificationsservice.js

4
lib/pushnotificationsservice.js

@ -124,7 +124,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
"data": { "data": {
"title": content.plain.subject, "title": content.plain.subject,
"message": content.plain.body, "message": content.plain.body,
"walletId": sjcl.hash.sha256.hash(notification.walletId), "walletId": sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(notification.walletId)),
"notId": Math.floor(Math.random() * 100000) + 1 "notId": Math.floor(Math.random() * 100000) + 1
} }
}; };
@ -135,7 +135,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
}, },
"sound": "default", "sound": "default",
"payload": { "payload": {
"walletId": sjcl.hash.sha256.hash(notification.walletId) "walletId": sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(notification.walletId))
} }
}; };
return next(err, opts); return next(err, opts);

Loading…
Cancel
Save