Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Common/Notifications.js
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | notification.success({ | ||||
</Paragraph> | </Paragraph> | ||||
), | ), | ||||
duration: currency.notificationDurationShort, | duration: currency.notificationDurationShort, | ||||
icon: <CashReceivedNotificationIcon />, | icon: <CashReceivedNotificationIcon />, | ||||
style: notificationStyle, | style: notificationStyle, | ||||
}); | }); | ||||
}; | }; | ||||
const xecReceivedNotificationWebsocket = ( | |||||
xecAmount, | |||||
cashtabSettings, | |||||
fiatPrice, | |||||
) => { | |||||
const notificationStyle = getDeviceNotificationStyle(); | |||||
notification.success({ | |||||
message: 'eCash received', | |||||
description: ( | |||||
<Paragraph> | |||||
+ {xecAmount.toLocaleString()} {currency.ticker}{' '} | |||||
{cashtabSettings && | |||||
cashtabSettings.fiatCurrency && | |||||
`(${ | |||||
currency.fiatCurrencies[cashtabSettings.fiatCurrency] | |||||
.symbol | |||||
}${(xecAmount * fiatPrice).toFixed( | |||||
currency.cashDecimals, | |||||
)} ${cashtabSettings.fiatCurrency.toUpperCase()})`} | |||||
</Paragraph> | |||||
), | |||||
duration: currency.notificationDurationShort, | |||||
icon: <CashReceivedNotificationIcon />, | |||||
style: notificationStyle, | |||||
}); | |||||
}; | |||||
const eTokenReceivedNotification = ( | const eTokenReceivedNotification = ( | ||||
currency, | currency, | ||||
receivedSlpTicker, | receivedSlpTicker, | ||||
receivedSlpQty, | receivedSlpQty, | ||||
receivedSlpName, | receivedSlpName, | ||||
) => { | ) => { | ||||
const notificationStyle = getDeviceNotificationStyle(); | const notificationStyle = getDeviceNotificationStyle(); | ||||
notification.success({ | notification.success({ | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
export { | export { | ||||
sendXecNotification, | sendXecNotification, | ||||
createTokenNotification, | createTokenNotification, | ||||
tokenIconSubmitSuccess, | tokenIconSubmitSuccess, | ||||
sendTokenNotification, | sendTokenNotification, | ||||
xecReceivedNotification, | xecReceivedNotification, | ||||
xecReceivedNotificationWebsocket, | |||||
eTokenReceivedNotification, | eTokenReceivedNotification, | ||||
errorNotification, | errorNotification, | ||||
messageSignedNotification, | messageSignedNotification, | ||||
generalNotification, | generalNotification, | ||||
burnTokenNotification, | burnTokenNotification, | ||||
}; | }; |