diff --git a/community_server/src/Controller/StateUsersController.php b/community_server/src/Controller/StateUsersController.php index 9f07fffdb..43c6664c0 100644 --- a/community_server/src/Controller/StateUsersController.php +++ b/community_server/src/Controller/StateUsersController.php @@ -69,14 +69,14 @@ class StateUsersController extends AppController $this->set(compact('stateUsers')); } - public function listIdentHashes() + /*public function listIdentHashes() { $stateUsers = $this->StateUsers->find('all')->toArray(); foreach ($stateUsers as $i => $user) { $stateUsers[$i]->identHash = TransactionCreation::DRMakeStringHash($user->email); } $this->set('stateUsers', $stateUsers); - } + }*/ public function search() { diff --git a/community_server/src/Controller/TransactionCreationsController.php b/community_server/src/Controller/TransactionCreationsController.php index 3530e3306..46a7a37f4 100644 --- a/community_server/src/Controller/TransactionCreationsController.php +++ b/community_server/src/Controller/TransactionCreationsController.php @@ -54,12 +54,12 @@ class TransactionCreationsController extends AppController ]; $transactionCreations = $this->paginate($this->TransactionCreations); $identHashes = []; - foreach ($transactionCreations as $creation) { + /*foreach ($transactionCreations as $creation) { $identHash = TransactionCreation::DRMakeStringHash($creation->state_user->email); $identHashes[$creation->state_user->id] = $identHash; - } + }*/ - $this->set(compact('transactionCreations', 'identHashes')); + //$this->set(compact('transactionCreations', 'identHashes')); } /** @@ -125,7 +125,7 @@ class TransactionCreationsController extends AppController if (count($receiverProposal) > $receiverIndex) { $pubKeyHex = $receiverProposal[$receiverIndex]['key']; - $identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']); + //$identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']); } $builderResult = TransactionCreation::build( $amountCent, diff --git a/community_server/src/Model/Transactions/TransactionCreation.php b/community_server/src/Model/Transactions/TransactionCreation.php index 4939c5400..72f42b3df 100644 --- a/community_server/src/Model/Transactions/TransactionCreation.php +++ b/community_server/src/Model/Transactions/TransactionCreation.php @@ -285,7 +285,7 @@ class TransactionCreation extends TransactionBase { // intval //$protoCreation->setIdentHash(intval($identHashBytes)); - $protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email)); + //$protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email)); return new TransactionCreation($protoCreation); } } diff --git a/community_server/src/Model/Transactions/TransactionTransfer.php b/community_server/src/Model/Transactions/TransactionTransfer.php index a509cf0f3..68203914d 100644 --- a/community_server/src/Model/Transactions/TransactionTransfer.php +++ b/community_server/src/Model/Transactions/TransactionTransfer.php @@ -75,7 +75,8 @@ class TransactionTransfer extends TransactionBase { foreach($sigPairs as $sigPair) { //echo 'sig Pair: '; var_dump($sigPair); echo "
"; $pubkey = bin2hex($sigPair->getPubKey()); - $hash = TransactionCreation::DRMakeStringHash($pubkey); + //$hash = TransactionCreation::DRMakeStringHash($pubkey); + $hash = $pubkey; if(!isset($sigPubHexs[$hash])) { $sigPubHexs[$hash] = [$pubkey]; } else { @@ -100,7 +101,8 @@ class TransactionTransfer extends TransactionBase { return false; } // check if signature exist for sender - $hash = TransactionCreation::DRMakeStringHash($senderPublicHex); + //$hash = TransactionCreation::DRMakeStringHash($senderPublicHex); + $hash = $senderPublicHex; if(!isset($sigPubHexs[$hash]) || in_array($senderPublicHex, $sigPubHexs[$hash]) === FALSE) { $this->addError($functionName, 'missing signature for sender'); return false;