Skip to content

Commit

Permalink
style: resolve style guide violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsANameToo authored and actions-user committed Dec 17, 2024
1 parent ddce893 commit 79e3f77
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/Transactions/Types/AbstractTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace ArkEcosystem\Crypto\Transactions\Types;

use ArkEcosystem\Crypto\Configuration\Network;
use ArkEcosystem\Crypto\Enums\ContractAbiType;
use ArkEcosystem\Crypto\Identities\Address;
use ArkEcosystem\Crypto\Transactions\Serializer;
use ArkEcosystem\Crypto\Utils\AbiDecoder;
Expand All @@ -32,21 +31,6 @@ public function __construct(?array $data = null)

abstract public function getPayload(): string;

protected function decodePayload(array $data): ?array
{
if (! isset($data['data'])) {
return null;
}

$payload = $data['data'];

if ($payload === '') {
return null;
}

return (new AbiDecoder())->decodeFunctionData($payload);
}

public function refreshPayloadData(): static
{
$this->data['data'] = ltrim($this->getPayload(), '0x');
Expand Down Expand Up @@ -186,6 +170,21 @@ public function hash(bool $skipSignature): BufferInterface
return TransactionHasher::toHash($hashData, $skipSignature);
}

protected function decodePayload(array $data): ?array
{
if (! isset($data['data'])) {
return null;
}

$payload = $data['data'];

if ($payload === '') {
return null;
}

return (new AbiDecoder())->decodeFunctionData($payload);
}

private function getSignature(): CompactSignatureInterface
{
$ecAdapter = EcAdapterFactory::getPhpEcc(
Expand Down

0 comments on commit 79e3f77

Please sign in to comment.