Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
transfer memo encryption fix
Browse files Browse the repository at this point in the history
  • Loading branch information
talhasch committed Jun 9, 2018
1 parent 32c9920 commit d8d711d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controllers/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,12 @@ export default ($scope, $rootScope, $routeParams, $timeout, $location, $filter,
const amount = formatStrAmount($scope.amount, $scope.asset);
let memo = $scope.memo.trim();

if(memo.startsWith('#')){
if (memo.startsWith('#')) {
if (!$rootScope.user.keys['memo']) {
$rootScope.showError('Memo private key required to create encrypted memo');
return;
}

const senderPrivateKey = cryptoService.decryptKey($rootScope.user.keys['memo']);
const receiverPublicKey = $scope.toData.memo_key;

Expand Down
4 changes: 4 additions & 0 deletions src/filters/transfer-memo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import steem from 'steem';
export default ($rootScope, cryptoService) => {
const transferMemoFilter = (op) => {

if(!op.memo){
return '';
}

if (!op.memo.startsWith('#')) {
return op.memo;
}
Expand Down

0 comments on commit d8d711d

Please sign in to comment.