Skip to content

Commit

Permalink
test id & signature
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries committed Nov 11, 2024
1 parent e554c7a commit f69c147
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 1 addition & 10 deletions tests/Concerns/Deserialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

trait Deserialize
{
protected function assertDeserialized(array $expected, array $keys, int $network = 30): object
protected function assertDeserialized(array $expected, array $keys): object
{
$actual = Deserializer::new($expected['serialized'])->deserialize();
$data = $actual->data;
Expand Down Expand Up @@ -51,15 +51,6 @@ protected function assertSameTransactions(array $expected, array $actual, array
}
}

// Signatures and IDs are not deterministic
unset($expected['id']);
unset($expected['signature']);
unset($expected['signatures']);

unset($actual['id']);
unset($actual['signature']);
unset($actual['signatures']);

$this->assertSame($expected, $actual);
}

Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Transactions/DeserializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ public function it_should_deserialize_a_validator_resignation_signed_with_a_pass
private function assertTransaction(array $fixture): AbstractTransaction
{
$actual = $this->assertDeserialized($fixture, [
'id',
'nonce',
'gasPrice',
'gasLimit',
'contractId',
'signature',
]);

$this->assertTrue($actual->verify());
Expand Down

0 comments on commit f69c147

Please sign in to comment.