Skip to content

Commit

Permalink
Fix sign method
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0Vu committed Jun 2, 2018
1 parent e123ccb commit 471affb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ public function hash($includeSignature=false)
if ($includeSignature) {
$txData = $this->txData;
} else {
$rawTxData = $this->txData;

if ($chainId && $chainId > 0) {
$v = (int) $chainId;
$this->offsetSet('r', '');
Expand All @@ -338,6 +340,7 @@ public function hash($includeSignature=false)
$txData[$key] = $data;
}
}
$this->txData = $rawTxData;
}
$serializedTx = $this->rlp->encode($txData)->toString('utf8');

Expand Down

0 comments on commit 471affb

Please sign in to comment.