Skip to content

Commit d4ee264

Browse files
authored
fix(api): show delegate inscription id correctly (#439)
1 parent 5630644 commit d4ee264

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

api/ordinals/src/pg/pg-store.ts

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export class PgStore extends BasePgStore {
190190
i.timestamp AS genesis_timestamp,
191191
i.address AS genesis_address,
192192
i.charms,
193+
i.delegate,
193194
cur.address,
194195
cur.tx_index,
195196
cur.block_height,

api/ordinals/tests/api/inscriptions.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,15 @@ describe('/inscriptions', () => {
10561056
expect(response.statusCode).toBe(200);
10571057
expect(response.headers['content-length']).toBe('5');
10581058
expect(response.body).toBe('Hello');
1059+
1060+
const response2 = await fastify.inject({
1061+
method: 'GET',
1062+
url: '/ordinals/v1/inscriptions/42174ecc8a245841035793390bb53d63b3c2acb61366446f601b09e73b94b656i0',
1063+
});
1064+
expect(response2.statusCode).toBe(200);
1065+
expect(response2.json().delegate).toBe(
1066+
'38c46a8bf7ec90bc7f6b797e7dc84baa97f4e5fd4286b92fe1b50176d03b18dci0'
1067+
);
10591068
});
10601069
});
10611070

0 commit comments

Comments
 (0)