Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(console): Billing email #2512

Merged
merged 4 commits into from
Jul 19, 2023
Merged

fix(console): Billing email #2512

merged 4 commits into from
Jul 19, 2023

Conversation

Cosmin-Parvulescu
Copy link
Contributor

Description

  • Added a deduplication logic that might work in our scenario

Related Issues

Testing

  1. Duplicate alias for OAuth and Email
  2. Duplicate alias for 2+ OAuth
  3. Duplicate alias for 2+ Oauth and Email

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@Cosmin-Parvulescu Cosmin-Parvulescu added the bug Indicates an unexpected problem or unintended behavior label Jul 17, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu self-assigned this Jul 17, 2023
@maurerbot maurerbot changed the title fix(console): Billing fix(console): Billing email Jul 17, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu force-pushed the fix/console/billing branch 2 times, most recently from a1cd485 to 0f8f91d Compare July 18, 2023 14:23
inferredAddressURN = targetAddress?.baseUrn as AddressURN

if (!inferredAddressURN) {
throw new RollupError({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use an error with an HTTP status code, like BadRequestError or InternalServerError

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

(address) => address.qc.alias.toLowerCase() === spd.email.toLowerCase()
)

if (!targetAddress) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same resolution as above. 😁

// addressURN
let inferredAddressURN
if (!paymentData.addressURN) {
const addresses = await accountClient.getAddresses.query({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract this bit of code into something like a getAddressURNFromEmail() function, so it can also be used in index.tsx.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a method to the address router.

@@ -29,47 +29,55 @@ export const action: ActionFunction = getRollupReqFunctionErrorWrapper(
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also do the lookup from email to address? I keep getting Bad Request: AddressURNInput is not a string: undefined when trying to update my stripe info from the details page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an oversight in loading the default addressURN, the problem was addressed without needing to lookup address from email.

@betimshahini betimshahini merged commit 30300ce into main Jul 19, 2023
12 checks passed
@betimshahini betimshahini deleted the fix/console/billing branch July 19, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(console): Billing email
2 participants