diff --git a/src/store/middlewares/addedTransaction.js b/src/store/middlewares/addedTransaction.js index 9af3227aa..9baf3d2bd 100644 --- a/src/store/middlewares/addedTransaction.js +++ b/src/store/middlewares/addedTransaction.js @@ -1,5 +1,6 @@ import actionTypes from '../../constants/actions'; import { successAlertDialogDisplayed } from '../../actions/dialog'; +import { fromRawLsk } from '../../utils/lsk'; const addedTransactionMiddleware = store => next => (action) => { next(action); @@ -20,7 +21,7 @@ const addedTransactionMiddleware = store => next => (action) => { break; default: // send: undefined - text = `Your transaction of ${action.data.amount} LSK to ${action.data.recipientId} was accepted and will be processed in a few seconds.`; + text = `Your transaction of ${fromRawLsk(action.data.amount)} LSK to ${action.data.recipientId} was accepted and will be processed in a few seconds.`; break; } diff --git a/src/store/middlewares/addedTransaction.test.js b/src/store/middlewares/addedTransaction.test.js index 72c492c7b..273056afd 100644 --- a/src/store/middlewares/addedTransaction.test.js +++ b/src/store/middlewares/addedTransaction.test.js @@ -34,13 +34,13 @@ describe('addedTransaction middleware', () => { type: actionTypes.transactionAdded, data: { username: 'test', - amount: 100000000, + amount: 1e8, recipientId: '16313739661670634666L', }, }; const expectedMessages = [ - 'Your transaction of 100000000 LSK to 16313739661670634666L was accepted and will be processed in a few seconds.', + 'Your transaction of 1 LSK to 16313739661670634666L was accepted and will be processed in a few seconds.', 'Second passphrase registration was successfully submitted. It can take several seconds before it is processed.', 'Delegate registration was successfully submitted with username: "test". It can take several seconds before it is processed.', 'Your votes were successfully submitted. It can take several seconds before they are processed.',