From e645cd26e9c9208864933e1b3c382287bd9348e0 Mon Sep 17 00:00:00 2001 From: Leon Date: Fri, 13 Oct 2023 15:45:31 +0800 Subject: [PATCH] chore: use function --- .../helper/ClientLightningNetwork.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/engine/src/vaults/impl/lightning-network/helper/ClientLightningNetwork.ts b/packages/engine/src/vaults/impl/lightning-network/helper/ClientLightningNetwork.ts index cb08272cec2..89256c65dc1 100644 --- a/packages/engine/src/vaults/impl/lightning-network/helper/ClientLightningNetwork.ts +++ b/packages/engine/src/vaults/impl/lightning-network/helper/ClientLightningNetwork.ts @@ -267,19 +267,7 @@ class ClientLightning { ) .then((i) => i.data) .catch((e) => { - if (axios.isAxiosError(e)) { - const error = e as AxiosError<{ message: string }>; - const errorMessage = error.response?.data?.message; - if (errorMessage?.includes('not_enough_balance_include_ten_sats')) { - throw new NotEnoughBalanceIncludeTenSatsError(); - } else if ( - errorMessage?.includes('not_enough_balance_include_one_percent') - ) { - throw new NotEnoughBalanceIncludeOnePercentError(); - } - } - throw e; - // this.detectCheckBalanceError(e); + this.detectCheckBalanceError(e); }); }