src/Transactions/Deserializer.php
public function handleVersionOne(Transaction $transaction): Transaction
    {
        if (isset($transaction->secondSignature)) {
            $transaction->signSignature = $transaction->secondSignature;
        }

        if (Types::VOTE === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        if (Types::MULTI_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->asset['multisignature']['keysgroup'] = array_map(function ($key) {
                return '+'.$key;
            }, $transaction->asset['multisignature']['keysgroup']);
        }

        if (isset($transaction->vendorFieldHex)) {
            $transaction->vendorField = hex2bin($transaction->vendorFieldHex);
        }

        if (! isset($transaction->id)) {
            $transaction->id = $transaction->getId();
        }

        if (Types::SECOND_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        if (Types::MULTI_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        return $transaction;
    }
public function handleVersionOne(Transaction $transaction): Transaction
    {
        if (isset($transaction->secondSignature)) {
            $transaction->signSignature = $transaction->secondSignature;
        }

        if (Types::VOTE === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        if (Types::MULTI_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->asset['multisignature']['keysgroup'] = array_map(function ($key) {
                return '+'.$key;
            }, $transaction->asset['multisignature']['keysgroup']);
        }

        if (isset($transaction->vendorFieldHex)) {
            $transaction->vendorField = hex2bin($transaction->vendorFieldHex);
        }

        if (! isset($transaction->id)) {
            $transaction->id = $transaction->getId();
        }

        if (Types::SECOND_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        if (Types::MULTI_SIGNATURE_REGISTRATION === $transaction->type) {
            $transaction->recipientId = Address::fromPublicKey($transaction->senderPublicKey, $transaction->network);
        }

        return $transaction;
    }
public function handleVersionOne ( Transaction $ transaction ) : Transaction { if ( isset ( $ transaction -> secondSignature ) ) { $ transaction -> signSignature = $ transaction -> secondSignature ; } if ( Types :: VOTE === $ transaction -> type ) { $ transaction -> recipientId = Address :: fromPublicKey ( $ transaction -> senderPublicKey , $ transaction -> network ) ; } if ( Types :: MULTI_SIGNATURE_REGISTRATION === $ transaction -> type ) { $ transaction -> asset [ 'multisignature' ] [ 'keysgroup' ] = array_map ( function ( $ key ) { return '+' . $ key ; } , $ transaction -> asset [ 'multisignature' ] [ 'keysgroup' ] ) ; } if ( isset ( $ transaction -> vendorFieldHex ) ) { $ transaction -> vendorField = hex2bin ( $ transaction -> vendorFieldHex ) ; } if ( ! isset ( $ transaction -> id ) ) { $ transaction -> id = $ transaction -> getId ( ) ; } if ( Types :: SECOND_SIGNATURE_REGISTRATION === $ transaction -> type ) { $ transaction -> recipientId = Address :: fromPublicKey ( $ transaction -> senderPublicKey , $ transaction -> network ) ; } if ( Types :: MULTI_SIGNATURE_REGISTRATION === $ transaction -> type ) { $ transaction -> recipientId = Address :: fromPublicKey ( $ transaction -> senderPublicKey , $ transaction -> network ) ; } return $ transaction ; }
Handle the deserialization of transaction data with a version of 1.0.

@param \ArkEcosystem\Crypto\Transaction $transaction

@return \ArkEcosystem\Crypto\Transactions\Transaction
Handle the deserialization of transaction data with a version of 1 . 0 .