Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
fix: trim invoice on input
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jul 5, 2024
1 parent 46f4504 commit 0a8f8db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/screens/wallet/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { Label } from "src/components/ui/label";
import { LoadingButton } from "src/components/ui/loading-button";
import { useToast } from "src/components/ui/use-toast";
import { useBalances } from "src/hooks/useBalances";
import { useInfo } from "src/hooks/useInfo";
import { useCSRF } from "src/hooks/useCSRF";
import { useInfo } from "src/hooks/useInfo";
import { copyToClipboard } from "src/lib/clipboard";
import { PayInvoiceResponse } from "src/types";
import { request } from "src/utils/request";
Expand Down Expand Up @@ -81,7 +81,7 @@ export default function Send() {

const paste = async () => {
const text = await navigator.clipboard.readText();
setInvoice(text);
setInvoice(text.trim());
};

return (
Expand Down Expand Up @@ -175,7 +175,7 @@ export default function Send() {
autoFocus
placeholder="Enter an invoice"
onChange={(e) => {
setInvoice(e.target.value);
setInvoice(e.target.value.trim());
}}
/>
<Button
Expand Down

0 comments on commit 0a8f8db

Please sign in to comment.