From db9c40ae5c620a9a918e86d3fef9441beabfb961 Mon Sep 17 00:00:00 2001 From: KayleCoder Date: Wed, 31 Jul 2024 13:40:25 +0800 Subject: [PATCH] Adjust tonstorage util Signed-off-by: KayleCoder --- src/merkle/tonsutils.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/merkle/tonsutils.ts b/src/merkle/tonsutils.ts index 89427da..180c77c 100644 --- a/src/merkle/tonsutils.ts +++ b/src/merkle/tonsutils.ts @@ -76,6 +76,12 @@ export async function addTonBag({ files, donwload_all, }), + }).then((res: Response) => { + if (res.status == 200) { + return res.json() + } else { + throw new Error(`Call storage api failed: ${res.status}`) + } }); }