Skip to content

Commit

Permalink
chore: improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Feb 19, 2024
1 parent 4eb664f commit 6c1b673
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/screens/LNURLChannel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@ function LNURLChannel() {
msg.reply(callbackResponse?.data);
}
} catch (e) {
console.error(e);
if (axios.isAxiosError(e)) {
const error =
(e.response?.data as { reason?: string })?.reason || e.message;
console.error(e);
toast.error(`Error: ${error}`);
} else if (e instanceof Error) {
toast.error(`Error: ${e.message}`);
}
} finally {
setLoadingConfirm(false);
Expand Down Expand Up @@ -124,8 +126,8 @@ function LNURLChannel() {
/>
<div className="flex">
<Checkbox
id="is_private_channel"
name="private channel checkbox"
id="open_private_channel"
name="open_private_channel"
checked={isPrivateChannel}
onChange={(event) => {
setIsPrivateChannel(event.target.checked);
Expand All @@ -135,7 +137,7 @@ function LNURLChannel() {
htmlFor="is_private_channel"
className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white"
>
Open a private channel?
{t("is_private_channel.label")}
</label>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,9 @@
"content_message": {
"heading": "Request a channel from the node"
},
"is_private_channel": {
"label": "Open a private channel?"
},
"success": "Channel request sent successfully to {{name}}"
},
"lnurlwithdraw": {
Expand Down

0 comments on commit 6c1b673

Please sign in to comment.