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

Add billing address hook to customer accounts #2583

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

oleksandroliynyk
Copy link
Contributor

@oleksandroliynyk oleksandroliynyk commented Jan 24, 2025

Background

Adds a missing helper react hook for billing address.

The data is already available in the API spec, this just adds a helper to access it.

Solution

N/A

🎩

  • ...

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

@oleksandroliynyk oleksandroliynyk force-pushed the add-billing-address-hook branch from a57d363 to da6f4e1 Compare January 24, 2025 13:56
@oleksandroliynyk oleksandroliynyk marked this pull request as ready for review January 27, 2025 11:43
Copy link
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset directory. If the changes are user-facing and should cause a version bump, run yarn changeset to track your changes and include them in the next release CHANGELOG. If you are making simple updates to repo configuration, examples, or documentation, you do not need to add a changeset.

Copy link
Contributor

@brianshen1990 brianshen1990 left a comment

Choose a reason for hiding this comment

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

Do we want to backfill existing stable versions?

@oleksandroliynyk
Copy link
Contributor Author

Do we want to backfill existing stable versions?

Yes, we also have another api we want to backfill (SKU field)


import {mount, createMockStatefulRemoteSubscribable} from './mount';

describe('useBillingAddress', () => {
Copy link
Member

Choose a reason for hiding this comment

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

could we add a test that tests the error case? 🙏

Like we did here:

it('raises an exception without approval scopes granted', () => {

It's also odd that we have a shopping and a shipping address test where one tests the happy path and one tests the error case. Those should be in the same file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, cleaned it up

@oleksandroliynyk oleksandroliynyk merged commit 055e9c5 into unstable Jan 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants