hash to hex

This commit is contained in:
Gabriel Bazán 2016-04-07 13:12:20 -03:00
parent a1b75c14c6
commit 56b0b5c5a6
1 changed files with 2 additions and 2 deletions

View File

@ -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);