From 01f690a86c7bc4caa2c24c239e9281fe05caa4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 14 Oct 2024 16:07:15 +0200 Subject: [PATCH] Add 0x prefix --- .../proof-of-transfer/stackers-for-signer-in-cycle.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.ts b/src/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.ts index db819e3..e2362bb 100644 --- a/src/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.ts +++ b/src/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.ts @@ -60,7 +60,10 @@ export async function stackersForSignerInCycle( }; } - const endpoint = `${opts.baseUrl}/extended/v2/pox/cycles/${opts.cycleNumber}/signers/${opts.signerPublicKey}/stackers?${search}`; + const signerPublicKey = opts.signerPublicKey.startsWith("0x") + ? opts.signerPublicKey + : `0x${opts.signerPublicKey}`; + const endpoint = `${opts.baseUrl}/extended/v2/pox/cycles/${opts.cycleNumber}/signers/${signerPublicKey}/stackers?${search}`; const res = await fetch(endpoint, init); if (!res.ok) {