Skip to content
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

Fixes #192 missing history entry after claiming back from the history entry #198

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/screens/History/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { truncateNostrProfileInfo } from '@nostr/util'
import { usePromptContext } from '@src/context/Prompt'
import { useThemeContext } from '@src/context/Theme'
import { NS } from '@src/i18n'
import { addToHistory } from '@src/storage/store/latestHistoryEntries'
import { historyStore } from '@store'
import { globals, mainColors } from '@styles'
import { copyStrToClipboard, formatInt, formatMintUrl, getLnInvoiceInfo, isUndef } from '@util'
Expand Down Expand Up @@ -104,6 +105,7 @@ export default function DetailsPage({ navigation, route }: THistoryEntryPageProp
// entry.isSpent can only be false here and is not undefined anymore
await historyStore.updateHistoryEntry({ ...route.params.entry, isSpent: false }, { ...route.params.entry, isSpent: true })
setSpent(true)
await addToHistory({ ...route.params.entry, amount: Math.abs(route.params.entry.amount), isSpent: true })
stopLoading()
openPromptAutoClose({
msg: t(
Expand Down
Loading