Skip to content

Commit

Permalink
fix: pull in correct openapi spec for wallet address routes in sdk (#397
Browse files Browse the repository at this point in the history
)

* fix: pull in correct openapi spec for wallet address routes in sdk

* feat: changeset
  • Loading branch information
njlie authored Dec 12, 2023
1 parent 382120d commit fe2c0d0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/modern-cups-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@interledger/open-payments': minor
---

- Pulls in correct OpenAPI spec when wallet address validators are created in the SDK.
- Updates the types returned by Grant continue route.
4 changes: 3 additions & 1 deletion packages/open-payments/src/client/grant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export const createGrantRoutes = (deps: GrantRouteDeps): GrantRoutes => {
path: getASPath('/'),
method: HttpMethod.POST
})
const continueGrantValidator = openApi.createResponseValidator<Grant>({
const continueGrantValidator = openApi.createResponseValidator<
GrantContinuation | Grant
>({
path: getASPath('/continue/{id}'),
method: HttpMethod.POST
})
Expand Down
4 changes: 2 additions & 2 deletions packages/open-payments/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ export interface UnauthenticatedClient {
export const createUnauthenticatedClient = async (
args: CreateUnauthenticatedClientArgs
): Promise<UnauthenticatedClient> => {
const { resourceServerOpenApi, ...baseDeps } =
const { resourceServerOpenApi, walletAddressServerOpenApi, ...baseDeps } =
await createUnauthenticatedDeps(args)

return {
walletAddress: createWalletAddressRoutes({
...baseDeps,
openApi: resourceServerOpenApi
openApi: walletAddressServerOpenApi
}),
incomingPayment: createUnauthenticatedIncomingPaymentRoutes({
...baseDeps,
Expand Down

0 comments on commit fe2c0d0

Please sign in to comment.