fix(api): show delegate inscription id correctly (#439)

This commit is contained in:
Rafael Cárdenas
2025-02-18 13:58:06 -06:00
committed by GitHub
parent 563064413b
commit d4ee264ad0
2 changed files with 10 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ export class PgStore extends BasePgStore {
i.timestamp AS genesis_timestamp, i.timestamp AS genesis_timestamp,
i.address AS genesis_address, i.address AS genesis_address,
i.charms, i.charms,
i.delegate,
cur.address, cur.address,
cur.tx_index, cur.tx_index,
cur.block_height, cur.block_height,

View File

@@ -1056,6 +1056,15 @@ describe('/inscriptions', () => {
expect(response.statusCode).toBe(200); expect(response.statusCode).toBe(200);
expect(response.headers['content-length']).toBe('5'); expect(response.headers['content-length']).toBe('5');
expect(response.body).toBe('Hello'); expect(response.body).toBe('Hello');
const response2 = await fastify.inject({
method: 'GET',
url: '/ordinals/v1/inscriptions/42174ecc8a245841035793390bb53d63b3c2acb61366446f601b09e73b94b656i0',
});
expect(response2.statusCode).toBe(200);
expect(response2.json().delegate).toBe(
'38c46a8bf7ec90bc7f6b797e7dc84baa97f4e5fd4286b92fe1b50176d03b18dci0'
);
}); });
}); });