From 56b0b5c5a6037bf5bf56d5a81e540071569f3230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Thu, 7 Apr 2016 13:12:20 -0300 Subject: [PATCH] hash to hex --- lib/pushnotificationsservice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pushnotificationsservice.js b/lib/pushnotificationsservice.js index 96231c6..3c8990e 100644 --- a/lib/pushnotificationsservice.js +++ b/lib/pushnotificationsservice.js @@ -124,7 +124,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio "data": { "title": content.plain.subject, "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 } }; @@ -135,7 +135,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio }, "sound": "default", "payload": { - "walletId": sjcl.hash.sha256.hash(notification.walletId) + "walletId": sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(notification.walletId)) } }; return next(err, opts);