BlueWallet/screen
PeterXMR d7261d4d2a FIX: ElectrumTransaction confirmation fields are optional until mined (#8093)
Electrum's `blockchain.transaction.get` verbose response does not include
`blockhash`, `confirmations`, `time`, or `blocktime` when the transaction
is still in the mempool. Both `ElectrumTransaction` in
`blue_modules/BlueElectrum.ts` and the sibling `Transaction` type in
`class/wallets/types.ts` declared all four as required, which silently
let unguarded access compile and crash at runtime on real mempool data.

- Mark the four confirmation-only fields optional on both types. They
  describe the same shape and have the same bug.
- Export `ElectrumTransaction` so a regression test can reference it.
- Collapse the two-line `tx.timestamp = tx.blocktime; if (!tx.blocktime)
  tx.timestamp = ...` pattern in `abstract-hd-electrum-wallet.ts` into a
  single `||` fallback — type-safe and runtime-equivalent.
- Add nullish-coalesce guards at the two call sites that compared
  `confirmations` directly to a number. In `useWidgetCommunication.ios.ts`,
  `t.confirmations ?? 0` keeps the filter semantically unchanged. In
  `PaymentCodesList.tsx`, normalize once via
  `notificationTx?.confirmations ?? 0` and use the local in both the
  `> 0` (already confirmed) and `=== 0` (mempool / unconfirmed alert)
  branches — otherwise a mempool notification tx would skip both branches
  and the code would create a duplicate notification transaction.
- Add `tests/unit/electrum-transaction-types.test.ts` documenting that a
  mempool-shaped object satisfies the type.
2026-05-28 09:43:46 +01:00
..
lnd ref: prompt 2026-05-21 13:29:42 +01:00
receive fix: inputs alignments (#8570) 2026-05-21 09:14:38 +02:00
send REF: blue electrum 2026-05-27 20:40:07 +01:00
settings REF: blue electrum 2026-05-27 20:40:07 +01:00
transactions REF: blue electrum 2026-05-27 20:40:07 +01:00
wallets FIX: ElectrumTransaction confirmation fields are optional until mined (#8093) 2026-05-28 09:43:46 +01:00
ActionSheet.common.ts REF: MultipleStepsListItem to TSX 2025-01-19 15:12:35 -04:00
ActionSheet.ios.ts REF: bump react native 2026-03-16 21:13:23 +00:00
ActionSheet.ts REF: bump react native 2026-03-16 21:13:23 +00:00
PlausibleDeniability.tsx REF: split BlueComponents, prune dead/optional props 2026-05-18 12:56:12 +01:00
PromptPasswordConfirmationSheet.tsx REF: bump react native 2026-03-16 21:13:23 +00:00
PromptPasswordConfirmationSheet.types.ts REF: bump react native 2026-03-16 21:13:23 +00:00
SelectFeeScreen.tsx fix: send screen scroll and fees modal (#8495) 2026-04-29 07:11:42 +02:00
UnlockWith.tsx REF: split BlueComponents, prune dead/optional props 2026-05-18 12:56:12 +01:00