Skip to content

Commit

Permalink
chore: use function
Browse files Browse the repository at this point in the history
  • Loading branch information
originalix committed Oct 13, 2023
1 parent df5d8b0 commit e645cd2
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down

0 comments on commit e645cd2

Please sign in to comment.