Skip to content

[FIX] Typo #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/Drivers/CborDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

use CBOR\ByteStringObject;
use CBOR\Decoder;
use CBOR\TAg;
use CBOR\StringStream;
use CBOR\OtherObject;
use CBOR\OtherObject\OtherObjectManager;
use CBOR\OtherObject\SimpleObject;
use CBOR\Tag\GenericTag;
use CBOR\Tag\TagManager;
use CBOR\Tag\UnsignedBigIntegerTag;
use Illuminate\Support\Str;
use Merkeleon\PhpCryptocurrencyAddressValidation\Utils\Base58Decoder;
use Throwable;
Expand All @@ -25,11 +27,11 @@ public function __construct(array $options)
{
parent::__construct($options);

$otherObjectManager = new OtherObject\OtherObjectManager();
$otherObjectManager->add(OtherObject\SimpleObject::class);
$otherObjectManager = new OtherObjectManager();
$otherObjectManager->add(SimpleObject::class);

$tagManager = new Tag\TagManager();
$tagManager->add(Tag\UnsignedBigIntegerTag::class);
$tagManager = new TagManager();
$tagManager->add(UnsignedBigIntegerTag::class);

$this->decoder = new Decoder($tagManager, $otherObjectManager);
}
Expand All @@ -49,7 +51,7 @@ public function check(string $address): bool
$stream = new StringStream($data);


/** @var OtherObject\SimpleObject $object */
/** @var SimpleObject $object */
$object = $this->decoder->decode($stream);
if ($object->getMajorType() !== 4) {
return false;
Expand Down