diff --git a/locksmith/src/utils/middlewares/lockManagerOrPayer.ts b/locksmith/src/utils/middlewares/lockManagerOrPayer.ts index 35c89ed0c1e..f561b2cc94d 100644 --- a/locksmith/src/utils/middlewares/lockManagerOrPayer.ts +++ b/locksmith/src/utils/middlewares/lockManagerOrPayer.ts @@ -53,8 +53,7 @@ export const lockManagerOrPayerMiddleware: RequestHandler = async ( receipt?.payer?.toLocaleLowerCase() === userAddress?.toLocaleLowerCase() const isRecipient = - // @ts-expect-error error TS2339: Property 'recipient' does not exist on type - receipt?.recipient?.toLowerCase() === userAddress?.toLowerCase() + receipt?.recipient?.toLocaleLowerCase() === userAddress?.toLocaleLowerCase() if (!isLockManager && !isPayer && !isRecipient) { return res.status(403).send({ diff --git a/packages/unlock-js/src/subgraph/schema.graphql b/packages/unlock-js/src/subgraph/schema.graphql index 59d2e3e00ad..51ff34de127 100644 --- a/packages/unlock-js/src/subgraph/schema.graphql +++ b/packages/unlock-js/src/subgraph/schema.graphql @@ -94,7 +94,7 @@ query AllReceipts( timestamp sender payer - # recipient # removed until subgraph have been updated! + recipient lockAddress tokenAddress gasTotal diff --git a/subgraph/introspection.json b/subgraph/introspection.json index 71f2e1a3656..5456443f286 100644 --- a/subgraph/introspection.json +++ b/subgraph/introspection.json @@ -5933,6 +5933,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "recipient", + "description": "Fund receiver", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lockAddress", "description": "Address of the Lock smart contract", @@ -10960,11 +10972,7 @@ { "name": "skip", "description": null, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -10985,11 +10993,7 @@ { "name": "include", "description": null, - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], + "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], "args": [ { "name": "if", @@ -11010,17 +11014,13 @@ { "name": "entity", "description": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive.", - "locations": [ - "OBJECT" - ], + "locations": ["OBJECT"], "args": [] }, { "name": "subgraphId", "description": "Defined a Subgraph ID for an object type", - "locations": [ - "OBJECT" - ], + "locations": ["OBJECT"], "args": [ { "name": "id", @@ -11041,9 +11041,7 @@ { "name": "derivedFrom", "description": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API.", - "locations": [ - "FIELD_DEFINITION" - ], + "locations": ["FIELD_DEFINITION"], "args": [ { "name": "field",