Skip to content

Commit

Permalink
Remove CanClaim validation
Browse files Browse the repository at this point in the history
  • Loading branch information
enjinabner committed Apr 4, 2024
1 parent ad72f1c commit 62cf130
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
3 changes: 1 addition & 2 deletions src/GraphQL/Queries/GetBeamQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ protected function rules(array $args = []): array
'bail',
'filled',
'max:1024',
$singleUse ? new SingleUseCodeExist() : 'exists:beams,code,deleted_at,NULL',
new CanClaim($singleUse),
$singleUse ? new SingleUseCodeExist() : 'exists:beams,code,deleted_at,NULL'
],
'account' => ['sometimes', 'bail', new ValidSubstrateAccount(), new ScanLimit()],
];
Expand Down
15 changes: 0 additions & 15 deletions tests/Feature/GraphQL/Queries/GetBeamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,6 @@ public function test_it_will_fail_with_scan_limit(): void
$this->assertArraySubset(['account' => ['You have reached the maximum limit to retry.']], $response['error']);
}

/**
* Test get beam with no more claims.
*/
public function test_it_will_fail_with_no_more_claims(): void
{
$this->claimAllBeams(resolve(SubstrateProvider::class)->public_key());

$response = $this->graphql($this->method, [
'code' => $this->beam->code,
'account' => resolve(SubstrateProvider::class)->public_key(),
], true);

$this->assertArraySubset(['code' => ['There are no more claims available.']], $response['error']);
}

/**
* Test isclaimable flag with no more claims.
*/
Expand Down

0 comments on commit 62cf130

Please sign in to comment.