Skip to content

Commit

Permalink
Merge pull request #2940 from getAlby/chore/error-on-make-invoice
Browse files Browse the repository at this point in the history
chore: show toast error on make invoice call
  • Loading branch information
bumi authored Dec 18, 2023
2 parents e9232a4 + 003b035 commit 31fb871
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/screens/MakeInvoice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TextField from "@components/form/TextField";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import ScreenHeader from "~/app/components/ScreenHeader";
import toast from "~/app/components/Toast";
import { useSettings } from "~/app/context/SettingsContext";
import { useNavigationState } from "~/app/hooks/useNavigationState";
import { USER_REJECTED_ERROR } from "~/common/constants";
Expand Down Expand Up @@ -91,6 +92,7 @@ function MakeInvoice() {
});
msg.reply(response);
} catch (e) {
if (e instanceof Error) toast.error(`${tCommon("error")}: ${e.message}`);
console.error(e);
} finally {
setLoading(false);
Expand Down

0 comments on commit 31fb871

Please sign in to comment.