Add NIP-05 support and improve payment interaction handling

This commit is contained in:
HolgerHatGarKeineNode
2026-02-03 20:32:04 +01:00
parent 11399e7492
commit 71ce57ddd3
2 changed files with 48 additions and 12 deletions

View File

@@ -15,6 +15,20 @@ it('handles nostr login correctly', function () {
->assertSet('currentPleb.pubkey', $pleb->pubkey);
});
it('handles nostr login for active member and initializes payment state', function () {
$pleb = EinundzwanzigPleb::factory()->active()->create();
expect($pleb->paymentEvents()->count())->toBe(0);
Livewire::test('association.profile')
->call('handleNostrLoggedIn', $pleb->pubkey)
->assertSet('currentPubkey', $pleb->pubkey)
->assertSet('currentPleb.pubkey', $pleb->pubkey)
->assertSet('amountToPay', config('app.env') === 'production' ? 21000 : 1);
expect($pleb->paymentEvents()->count())->toBeGreaterThan(0);
});
it('handles nostr logout correctly', function () {
$pleb = EinundzwanzigPleb::factory()->create();