Skip to content

Commit

Permalink
remove second passphrase tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries committed Jul 22, 2024
1 parent 2edffef commit 4e570b4
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 155 deletions.
14 changes: 0 additions & 14 deletions tests/Unit/Transactions/Builder/DelegateRegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = DelegateRegistrationBuilder::new()
->username('polopolo')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
13 changes: 0 additions & 13 deletions tests/Unit/Transactions/Builder/DelegateResignationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = DelegateResignationBuilder::new()
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
16 changes: 0 additions & 16 deletions tests/Unit/Transactions/Builder/HtlcClaimTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = HtlcClaimBuilder::new()
->htlcClaimAsset(
'fe1a1b3b117c28078c5d3c42ffb9492234afc01d15b08c047feccf0b6bee0f78',
'my secret that should be 32bytes'
)->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
19 changes: 0 additions & 19 deletions tests/Unit/Transactions/Builder/HtlcLockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = HtlcLockBuilder::new()
->htlcLockAsset(
'0f128d401958b1b30ad0d10406f47f9489321017b4614e6cb993fc63913c5454',
1,
1
)
->recipient('ANBkoGqWeTSiaEVgVzSKZd3jS7UWzv9PSo')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
16 changes: 1 addition & 15 deletions tests/Unit/Transactions/Builder/HtlcRefundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,7 @@ public function it_should_sign_it_with_a_passphrase()

$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = HtlcRefundBuilder::new()
->htlcRefundAsset('fe1a1b3b117c28078c5d3c42ffb9492234afc01d15b08c047feccf0b6bee0f78')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}


/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
14 changes: 0 additions & 14 deletions tests/Unit/Transactions/Builder/IPFSTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = IPFSBuilder::new()
->ipfsAsset('QmR45FmbVVrixReBwJkhEKde2qwHYaQzGxu4ZoDeswuF9w')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
14 changes: 0 additions & 14 deletions tests/Unit/Transactions/Builder/MultiPaymentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = MultiPaymentBuilder::new()
->add('AXoXnFi4z1Z6aFvjEYkDVCtBGW2PaRiM25', '100000000')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
20 changes: 0 additions & 20 deletions tests/Unit/Transactions/Builder/MultiSignatureRegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = MultiSignatureRegistrationBuilder::new()
->min(2)
->lifetime(255)
->keysgroup([
'03a02b9d5fdd1307c2ee4652ba54d492d1fd11a7d1bb3f3a44c4a05e79f19de933',
'13a02b9d5fdd1307c2ee4652ba54d492d1fd11a7d1bb3f3a44c4a05e79f19de933',
'23a02b9d5fdd1307c2ee4652ba54d492d1fd11a7d1bb3f3a44c4a05e79f19de933',
])
->sign('this is a top secret passphrase')
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
16 changes: 0 additions & 16 deletions tests/Unit/Transactions/Builder/TransferTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = TransferBuilder::new()
->recipient('AXoXnFi4z1Z6aFvjEYkDVCtBGW2PaRiM25')
->amount('133380000000')
->vendorField('This is a transaction from PHP')
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down
14 changes: 0 additions & 14 deletions tests/Unit/Transactions/Builder/VoteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ public function it_should_sign_it_with_a_passphrase()
$this->assertTrue($transaction->verify());
}

/** @test */
public function it_should_sign_it_with_a_second_passphrase()
{
$secondPassphrase = 'this is a top secret second passphrase';

$transaction = VoteBuilder::new()
->votes(['+034151a3ec46b5670a682b0a63394f863587d1bc97483b1b6c70eb58e7f0aed192'])
->sign($this->passphrase)
->secondSign($secondPassphrase);

$this->assertTrue($transaction->verify());
$this->assertTrue($transaction->secondVerify(PublicKey::fromPassphrase($secondPassphrase)->getHex()));
}

/** @test */
public function it_should_match_fixture_passphrase()
{
Expand Down

0 comments on commit 4e570b4

Please sign in to comment.