Skip to content

Commit

Permalink
Merge pull request #4 from krigga/api-v4-get-name
Browse files Browse the repository at this point in the history
URI encode get method name for API v4
  • Loading branch information
Dan Volkov authored Sep 10, 2023
2 parents 865fe60 + bf37d8d commit 8316fa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/TonClient4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class TonClient4 {
*/
async runMethod(seqno: number, address: Address, name: string, args?: TupleItem[]) {
let tail = args && args.length > 0 ? '/' + toUrlSafe(serializeTuple(args).toBoc({ idx: false, crc32: false }).toString('base64')) : '';
let url = this.#endpoint + '/block/' + seqno + '/' + address.toString({ urlSafe: true }) + '/run/' + name + tail;
let url = this.#endpoint + '/block/' + seqno + '/' + address.toString({ urlSafe: true }) + '/run/' + encodeURIComponent(name) + tail;
let res = await axios.get(url, { adapter: this.#adapter, timeout: this.#timeout });
let runMethod = runMethodCodec.safeParse(res.data);
if (!runMethod.success) {
Expand Down

0 comments on commit 8316fa7

Please sign in to comment.