Skip to content

Commit

Permalink
Fixes #192
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Sep 10, 2023
1 parent 92d05a4 commit 997d1c0
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit 997d1c0

Please sign in to comment.