Skip to content

Commit

Permalink
fix: pos urls (GaloyMoney#3267)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev authored May 15, 2024
1 parent b4dad3a commit 650bceb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app/screens/settings-screen/settings/account-pos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ import { SettingsRow } from "../row"

export const AccountPOS: React.FC = () => {
const { appConfig } = useAppConfig()
const posUrl = appConfig.galoyInstance.lnAddressHostname
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={pos}
subtitle={short}
subtitleShorter={data.me.username.length > 22}
leftIcon="calculator"
rightIcon={<GaloyIcon name="link" size={24} />}
Expand Down
6 changes: 4 additions & 2 deletions app/screens/settings-screen/settings/account-static-qr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ import { SettingsRow } from "../row"

export const AccountStaticQR: React.FC = () => {
const { appConfig } = useAppConfig()
const posUrl = appConfig.galoyInstance.lnAddressHostname
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={qrUrl}
subtitle={short}
subtitleShorter={true}
leftIcon="qr-code-outline"
rightIcon={<GaloyIcon name="link" size={24} />}
Expand Down

0 comments on commit 650bceb

Please sign in to comment.