Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #726 from LiskHQ/717-fix-amount-in-success-alert
Browse files Browse the repository at this point in the history
Fix amount in transaction success alert - Closes #717
  • Loading branch information
slaweet authored Sep 12, 2017
2 parents 6491058 + 2dd9349 commit 124eaed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/store/middlewares/addedTransaction.js
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/store/middlewares/addedTransaction.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down

0 comments on commit 124eaed

Please sign in to comment.