From ed23fd6ecace6f0ace0682573fb983b2000d6b57 Mon Sep 17 00:00:00 2001 From: Nishant Ghodke <64554492+iamcrazycoder@users.noreply.github.com> Date: Sat, 30 Sep 2023 11:27:16 +0530 Subject: [PATCH] fix(sdk): temporary fix for getInscriptions (#78) fix: temporary fix for getInscriptions --- packages/sdk/src/modules/JsonRpcDatasource.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/sdk/src/modules/JsonRpcDatasource.ts b/packages/sdk/src/modules/JsonRpcDatasource.ts index 1337050d..0ff96888 100644 --- a/packages/sdk/src/modules/JsonRpcDatasource.ts +++ b/packages/sdk/src/modules/JsonRpcDatasource.ts @@ -56,7 +56,14 @@ export default class JsonRpcDatasource extends BaseDatasource { } async getInscriptions({ outpoint, decodeMetadata }: GetInscriptionsOptions) { - const inscriptions = await rpc[this.network].call("GetInscriptions", { outpoint }, rpc.id) + const { inscriptions } = await rpc[this.network].call<{ + inscriptions: Inscription[] + pagination: { + limit: number + prev: string | null + next: string | null + } + }>("GetInscriptions", { outpoint }, rpc.id) return decodeMetadata ? DatasourceUtility.transformInscriptions(inscriptions) : inscriptions }