From fe0a80bd1e3df04c199a0ad642d9b926788c67e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 14 Oct 2024 17:22:00 +0200 Subject: [PATCH] Ensure hex string starts with 0x --- src/stacks-rpc-api/smart-contracts/map-entry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stacks-rpc-api/smart-contracts/map-entry.ts b/src/stacks-rpc-api/smart-contracts/map-entry.ts index e5fa9ae..842f372 100644 --- a/src/stacks-rpc-api/smart-contracts/map-entry.ts +++ b/src/stacks-rpc-api/smart-contracts/map-entry.ts @@ -38,7 +38,7 @@ export async function mapEntry(args: Args): Promise> { }; } init.method = "POST"; - init.body = args.mapKey; + init.body = args.mapKey.startsWith("0x") ? args.mapKey : `0x${args.mapKey}`; const endpoint = `${args.baseUrl}/v2/map_entry/${args.contractAddress}/${args.contractName}/${args.mapName}?${search}`; const res = await fetch(endpoint, init);