Skip to content

Commit

Permalink
Use 'received' instead of 'deposited' for anon zaps
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Jul 13, 2023
1 parent a9ffee3 commit ae4ea73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/invoice.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Qr from './qr'

export function Invoice ({ invoice, onSuccess }) {
export function Invoice ({ invoice, onSuccess, successVerb }) {
let variant = 'default'
let status = 'waiting for you'
if (invoice.confirmedAt) {
variant = 'confirmed'
status = `${invoice.satsReceived} sats deposited`
status = `${invoice.satsReceived} sats ${successVerb || 'deposited'}`
onSuccess?.(invoice)
} else if (invoice.cancelled) {
variant = 'failed'
Expand Down
2 changes: 1 addition & 1 deletion components/item-act.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default function ItemAct ({ onClose, itemId, act, strike }) {
await submitAct(satsReceived, id)
onClose()
}, 2000)
}}
}} successVerb='received'
/>
)
}
Expand Down
4 changes: 2 additions & 2 deletions pages/invoices/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function FullInvoice () {
)
}

export function LoadInvoice ({ id, onSuccess }) {
export function LoadInvoice ({ id, onSuccess, successVerb }) {
const router = useRouter()
const { loading, error, data } = useQuery(INVOICE, {
pollInterval: 1000,
Expand All @@ -27,5 +27,5 @@ export function LoadInvoice ({ id, onSuccess }) {
return <QrSkeleton status='loading' />
}

return <Invoice invoice={data.invoice} onSuccess={onSuccess} />
return <Invoice invoice={data.invoice} onSuccess={onSuccess} successVerb={successVerb} />
}

0 comments on commit ae4ea73

Please sign in to comment.