diff --git a/src/Transactions/Builder/AbstractTransactionBuilder.php b/src/Transactions/Builder/AbstractTransactionBuilder.php index 1d98d89..fd241b8 100644 --- a/src/Transactions/Builder/AbstractTransactionBuilder.php +++ b/src/Transactions/Builder/AbstractTransactionBuilder.php @@ -77,9 +77,9 @@ public function sign(string $passphrase): static $keys = PrivateKey::fromPassphrase($passphrase); $this->transaction->data['senderPublicKey'] = $keys->getPublicKey()->getHex(); - + $this->transaction = $this->transaction->sign($keys); - + $this->transaction->data['id'] = $this->transaction->getId(); return $this; diff --git a/src/Transactions/Deserializer.php b/src/Transactions/Deserializer.php index b71fd39..d4431f3 100644 --- a/src/Transactions/Deserializer.php +++ b/src/Transactions/Deserializer.php @@ -15,7 +15,6 @@ use ArkEcosystem\Crypto\Transactions\Types\Vote; use ArkEcosystem\Crypto\Utils\AbiDecoder; use ArkEcosystem\Crypto\Utils\Address; -use BitWasp\Buffertools\Buffer; class Deserializer { diff --git a/src/Transactions/Types/AbstractTransaction.php b/src/Transactions/Types/AbstractTransaction.php index 777cd48..adf3521 100644 --- a/src/Transactions/Types/AbstractTransaction.php +++ b/src/Transactions/Types/AbstractTransaction.php @@ -16,8 +16,6 @@ use BitWasp\Bitcoin\Crypto\EcAdapter\Key\PublicKeyInterface; use BitWasp\Bitcoin\Crypto\EcAdapter\Signature\CompactSignatureInterface; use BitWasp\Bitcoin\Crypto\Hash; -use BitWasp\Bitcoin\Key\Factory\PublicKeyFactory; -use BitWasp\Bitcoin\Signature\SignatureFactory; use BitWasp\Buffertools\Buffer; use BitWasp\Buffertools\BufferInterface; diff --git a/src/Utils/TransactionHasher.php b/src/Utils/TransactionHasher.php index e3298ec..a6da4f2 100644 --- a/src/Utils/TransactionHasher.php +++ b/src/Utils/TransactionHasher.php @@ -35,7 +35,7 @@ public static function toHash(array $transaction, bool $skipSignature = false): [], // accessList is unused ]; - if (!$skipSignature) { + if (! $skipSignature) { $signatureBuffer = hex2bin($transaction['signature']); $r = substr($signatureBuffer, 0, 32);