Skip to content

Commit df58231

Browse files
chore: revert
1 parent 9f5b391 commit df58231

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/contracts-api/attestationAction.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export class AttestationAction extends Action {
216216
/**
217217
* List attestation metadata with optional filtering
218218
*
219-
* This returns metadata for attestations, optionally filtered by requester address.
219+
* This returns metadata for attestations, optionally filtered by requester address or request transaction ID.
220220
* Supports pagination and sorting.
221221
*
222222
* @param input - Filter and pagination parameters
@@ -253,20 +253,7 @@ export class AttestationAction extends Action {
253253
// Note: Empty Uint8Array represents BYTEA NULL (handled by kwil-js 0.9.10+)
254254
const params: Types.NamedParams = {
255255
$requester: input.requester ?? new Uint8Array(0),
256-
// Normalize requestTxId if provided (strip 0x prefix, lowercase, trim)
257-
let normalizedRequestTxId: string | null = null;
258-
if (input.requestTxId) {
259-
const trimmed = input.requestTxId.trim();
260-
normalizedRequestTxId = trimmed.startsWith('0x')
261-
? trimmed.slice(2).toLowerCase()
262-
: trimmed.toLowerCase();
263-
}
264-
265-
// Prepare parameters for list_attestations view action
266-
// Note: Empty Uint8Array represents BYTEA NULL (handled by kwil-js 0.9.10+)
267-
const params: Types.NamedParams = {
268-
$requester: input.requester ?? new Uint8Array(0),
269-
$request_tx_id: normalizedRequestTxId,
256+
$request_tx_id: input.requestTxId ?? null,
270257
$limit: limit,
271258
$offset: offset,
272259
$order_by: input.orderBy ?? null,

0 commit comments

Comments
 (0)