Skip to content

Commit

Permalink
fix(sdk): temporary fix for getInscriptions (#78)
Browse files Browse the repository at this point in the history
fix: temporary fix for getInscriptions
  • Loading branch information
iamcrazycoder authored Sep 30, 2023
1 parent 100c6b7 commit ed23fd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/sdk/src/modules/JsonRpcDatasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,14 @@ export default class JsonRpcDatasource extends BaseDatasource {
}

async getInscriptions({ outpoint, decodeMetadata }: GetInscriptionsOptions) {
const inscriptions = await rpc[this.network].call<Inscription[]>("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
}
Expand Down

0 comments on commit ed23fd6

Please sign in to comment.