Skip to content

Commit

Permalink
Ensure hex string starts with 0x
Browse files Browse the repository at this point in the history
  • Loading branch information
aryzing committed Oct 14, 2024
1 parent 1de55fe commit fe0a80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stacks-rpc-api/smart-contracts/map-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export async function mapEntry(args: Args): Promise<Result<MapEntryResponse>> {
};
}
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);
Expand Down

0 comments on commit fe0a80b

Please sign in to comment.