Skip to content

Commit

Permalink
Fixes #192 (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Sep 11, 2023
1 parent 6f862c7 commit dd742cb
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 dd742cb

Please sign in to comment.