|
|
@ -193,7 +193,11 @@ EmailService.prototype._getDataForTemplate = function(notification, recipient, c |
|
|
|
var data = _.cloneDeep(notification.data); |
|
|
|
data.subjectPrefix = _.trim(self.subjectPrefix) + ' '; |
|
|
|
if (data.amount) { |
|
|
|
data.amount = WalletUtils.formatAmount(+data.amount, recipient.unit) + ' ' + recipient.unit; |
|
|
|
try { |
|
|
|
data.amount = WalletUtils.formatAmount(+data.amount, recipient.unit) + ' ' + recipient.unit; |
|
|
|
} catch (ex) { |
|
|
|
return cb(new Error('Could not format amount', ex)); |
|
|
|
} |
|
|
|
} |
|
|
|
self.storage.fetchWallet(notification.walletId, function(err, wallet) { |
|
|
|
if (err) return cb(err); |
|
|
|