the UI does not know that a user might be signed in on the server (via cookie)
the UI will allow an anonymous recurring donation using a custom email
the API (before this patch) would happily accept this donation but associate it with the currently signed in user, not that of the submitted email address
In lieu of a UI fix, this patch raises a form error explaining that you can't make an anonymous donation with an email while signed in. A proper (future) UI fix is probably to hit some kind of API endpoint asking "is this user signed in?" and, if so, fetching their email address. The UI could then pre-populate the email address in the donation form.
Fixes https://github.com/mozilla/payments-ui/issues/378
Here's the current problem:
In lieu of a UI fix, this patch raises a form error explaining that you can't make an anonymous donation with an email while signed in. A proper (future) UI fix is probably to hit some kind of API endpoint asking "is this user signed in?" and, if so, fetching their email address. The UI could then pre-populate the email address in the donation form.