Summary
Both DVA services reuse an account when active !== false || assigned !== false. The OR condition accepts an account when either flag is false, so an inactive-but-assigned or active-but-unassigned record can be selected and exposed as the user's funding destination.
Repository evidence
lib/services/paystack-dva.service.ts:480-488 selects the first account satisfying the permissive OR predicate.
lib/services/paystack-investor-dva.service.ts:380-387 contains the same predicate.
- The selected account is then stored with local status
ACTIVE in both services.
Scope
- Define one typed eligibility predicate for provider DVA reuse.
- Require the provider state needed for both assignment and active receipt of funds.
- Provision or surface a recoverable error when no eligible account exists.
Acceptance criteria
Tests
Non-goals
- Changing bank preference policy or introducing another payment provider.
Summary
Both DVA services reuse an account when
active !== false || assigned !== false. The OR condition accepts an account when either flag is false, so an inactive-but-assigned or active-but-unassigned record can be selected and exposed as the user's funding destination.Repository evidence
lib/services/paystack-dva.service.ts:480-488selects the first account satisfying the permissive OR predicate.lib/services/paystack-investor-dva.service.ts:380-387contains the same predicate.ACTIVEin both services.Scope
Acceptance criteria
Tests
active/assignedvalues, missing fields, multiple returned accounts, and no-eligible-account behavior.Non-goals