Skip to content

Commit

Permalink
fix: show full address for pos and static qr in settings (#3349)
Browse files Browse the repository at this point in the history
  • Loading branch information
openoms authored Dec 6, 2024
1 parent aefe4e3 commit 922902e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions app/screens/settings-screen/settings/account-pos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@ import { SettingsRow } from "../row"
export const AccountPOS: React.FC = () => {
const { appConfig } = useAppConfig()
const posUrl = appConfig.galoyInstance.posUrl
const shortUrl = appConfig.galoyInstance.lnAddressHostname

const { LL } = useI18nContext()

const { data, loading } = useSettingsScreenQuery()
if (!data?.me?.username) return <></>

const pos = `${posUrl}/${data.me.username}`
const short = `${shortUrl}/${data.me.username}`

return (
<SettingsRow
loading={loading}
title={LL.SettingsScreen.pos()}
subtitle={short}
subtitle={pos}
subtitleShorter={data.me.username.length > 22}
leftIcon="calculator"
rightIcon={<GaloyIcon name="link" size={24} />}
Expand Down
4 changes: 1 addition & 3 deletions app/screens/settings-screen/settings/account-static-qr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,19 @@ import { SettingsRow } from "../row"
export const AccountStaticQR: React.FC = () => {
const { appConfig } = useAppConfig()
const posUrl = appConfig.galoyInstance.posUrl
const shortUrl = appConfig.galoyInstance.lnAddressHostname

const { LL } = useI18nContext()

const { data, loading } = useSettingsScreenQuery()
if (!data?.me?.username) return <></>

const qrUrl = `${posUrl}/${data.me.username}/print`
const short = `${shortUrl}/${data.me.username}/print`

return (
<SettingsRow
loading={loading}
title={LL.SettingsScreen.staticQr()}
subtitle={short}
subtitle={qrUrl}
subtitleShorter={true}
leftIcon="qr-code-outline"
rightIcon={<GaloyIcon name="link" size={24} />}
Expand Down

0 comments on commit 922902e

Please sign in to comment.