Skip to content

Commit

Permalink
Merge branch 'master' into add/fallback-administrativeAreaLevel1
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrizmaselli authored Jun 26, 2024
2 parents 80e6771 + 7ac19d2 commit 2e6e848
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- fallback value for administrativeAreaLevel1 for profile V2

## [2.170.3] - 2024-06-26

### Fixed
- Filter out "pickup" addresses type temporarily while is still being saved at Profile V2.


## [2.170.2] - 2024-05-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"vendor": "vtex",
"name": "store-graphql",
"version": "2.170.2",
"version": "2.170.3",
"title": "GraphQL API for the VTEX store APIs",
"description": "GraphQL schema and resolvers for the VTEX API for the catalog and orders.",
"credentialType": "absolute",
Expand Down
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
"follow-redirects": "^1.14.8",
"busboy": "^1.6.0"
},
"version": "2.170.2"
"version": "2.170.3"
}
10 changes: 9 additions & 1 deletion node/resolvers/profile/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ export function getAddresses(context: Context, currentUserProfile?: Profile) {
vtex: { currentProfile },
} = context

return profile.getUserAddresses(currentProfile, context, currentUserProfile)
// Filter out temporarily addresses with addressType "pickup" because its also saved at Profile V2
return profile
.getUserAddresses(currentProfile, context, currentUserProfile)
.then((addresses: any[]) => {
const residentialAddresses = addresses.filter(
(address: { addressType: string }) => address.addressType !== 'pickup'
)
return residentialAddresses
})
}

export async function getPayments(context: Context) {
Expand Down

0 comments on commit 2e6e848

Please sign in to comment.