Skip to content

Commit

Permalink
Fixes #162
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Sep 10, 2023
1 parent 92d05a4 commit 97ec189
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/screens/History/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
return <SandClockIcon width={20} height={20} color={color.TEXT} />
}

const getMemo = () => {
if (isLn) {
if (memo === 'enuts') { return 'Cashu deposit' }
return memo
}
if (tokenMemo) { return tokenMemo }
return t('noMemo', { ns: NS.history })
}

return (
<View style={[globals(color).container, styles.container]}>
<TopNav
Expand Down Expand Up @@ -176,7 +185,7 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
<View style={styles.entryInfo}>
<Txt txt={t('memo', { ns: NS.history })} />
<Txt
txt={isLn && memo.length > 0 ? memo : tokenMemo && tokenMemo.length > 0 ? tokenMemo : t('noMemo', { ns: NS.history })}
txt={getMemo()}
styles={[styles.infoValue]}
/>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Payment/Receive/Invoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function InvoiceScreen({ navigation, route }: TMintInvoicePagePro
const newBalance = await getBalance()
// it is possible that success is false but invoice has been paid...
if (success || newBalance > previousBalance) {
// add as history entry (cash out via lightning)
// add as history entry
await addToHistory({
amount,
type: 2,
Expand Down

0 comments on commit 97ec189

Please sign in to comment.