Skip to content

Commit cdb12e7

Browse files
committed
chore: Remove getGeoCoordinates function
1 parent 6f8f9b3 commit cdb12e7

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

packages/api/src/platforms/vtex/resolvers/validateSession.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,6 @@ async function getPreciseLocationData(
3030
}
3131
}
3232

33-
async function getGeoCoordinates(
34-
clients: Context['clients'],
35-
country: string,
36-
postalCode: string
37-
) {
38-
try {
39-
const address = await clients.commerce.checkout.address({
40-
postalCode,
41-
country,
42-
})
43-
44-
const [longitude, latitude] = address.geoCoordinates
45-
return { latitude, longitude }
46-
} catch (err) {
47-
console.error(
48-
`Error while getting geo coordinates for the current postal code (${postalCode}) and country (${country}).\n`
49-
)
50-
51-
throw err
52-
}
53-
}
54-
5533
export const validateSession = async (
5634
_: any,
5735
{ session: oldSession, search }: MutationValidateSessionArgs,

0 commit comments

Comments
 (0)