-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve LNURL ux #2152
feat: improve LNURL ux #2152
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { useTranslation } from "react-i18next"; | ||
|
||
type RangeLabelProps = { | ||
min?: number | string | undefined; | ||
max?: number | string | undefined; | ||
}; | ||
export function RangeLabel({ min, max }: RangeLabelProps) { | ||
const { t } = useTranslation("common"); | ||
|
||
if (min && max) { | ||
return <>{t("range.between", { min, max })}</>; | ||
} else if (min) { | ||
return <>{t("range.greaterThan", { min })}</>; | ||
} else if (max) { | ||
return <>{t("range.lessThan", { max })}</>; | ||
} else { | ||
return null; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,6 +420,8 @@ function LNURLPay() { | |
fiatValue={fiatValue} | ||
/> | ||
<SatButtons | ||
min={Math.floor(+details.minSendable / 1000)} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is minSendable always available? undefined / 1000 = NaN There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think min / max are required fields for LNURL responses. Other components on this form use those value the same way: |
||
max={Math.floor(+details.maxSendable / 1000)} | ||
onClick={setValueSat} | ||
disabled={loadingConfirm} | ||
/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the head of Emoji is removing the ⚡️ emojis here?