From 0b99297d3b264956145c6fe11dd8d449b1beda32 Mon Sep 17 00:00:00 2001 From: modship Date: Mon, 2 Sep 2024 15:40:36 +0200 Subject: [PATCH] update cancel return type --- assembly/env/env.ts | 2 +- assembly/std/deferredCalls.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/assembly/env/env.ts b/assembly/env/env.ts index 3181ab2a..35f2d068 100644 --- a/assembly/env/env.ts +++ b/assembly/env/env.ts @@ -248,5 +248,5 @@ export namespace env { export declare function deferredCallExists(callId: string): bool; @external("massa", "assembly_script_deferred_call_cancel") - export declare function deferredCallCancel(callId: string): void; + export declare function deferredCallCancel(callId: string): bool; } diff --git a/assembly/std/deferredCalls.ts b/assembly/std/deferredCalls.ts index ac388565..770bd3a8 100644 --- a/assembly/std/deferredCalls.ts +++ b/assembly/std/deferredCalls.ts @@ -78,7 +78,9 @@ export function deferredCallExists(ascCallId: string): bool { * Cancel an deferred call * * @param ascCallId - The id of the deferred call + * + * @returns True if the deferred call has been canceled otherwise false */ -export function deferredCallCancel(ascCallId: string): void { - env.deferredCallCancel(ascCallId); +export function deferredCallCancel(ascCallId: string): bool { + return env.deferredCallCancel(ascCallId); }