BlueWallet/class/wallets
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
..
abstract-hd-electrum-wallet.ts FIX: ElectrumTransaction confirmation fields are optional until mined (#8093) 2026-05-28 09:43:46 +01:00
abstract-hd-wallet.ts ref: replace Buffer with Uint8Array in some internal structures 2026-01-15 13:20:42 +00:00
abstract-wallet.ts REF: bump react native 2026-03-16 21:13:23 +00:00
hd-aezeed-wallet.ts ref: replace Buffer with Uint8Array in some internal structures 2026-01-15 13:20:42 +00:00
hd-legacy-breadwallet-wallet.ts REF: Replace buffer with Uint8Array 2025-10-30 19:24:05 +00:00
hd-legacy-electrum-seed-p2pkh-wallet.ts fix: appy simple-import-sort plugin 2024-05-21 11:56:10 +01:00
hd-legacy-p2pkh-wallet.ts REF: Replace buffer with Uint8Array 2025-10-30 19:24:05 +00:00
hd-segwit-bech32-wallet.ts ADD: send to SilentPayment address 2024-05-30 14:54:29 +01:00
hd-segwit-electrum-seed-p2wpkh-wallet.ts ref: use Uint8Array instead of Buffer where possible 2025-08-02 17:31:08 +03:00
hd-segwit-p2sh-wallet.ts REF: Replace buffer with Uint8Array 2025-10-30 19:24:05 +00:00
hd-taproot-wallet.ts FIX: hw wallets with taproot integration 2025-11-17 11:00:23 +00:00
legacy-wallet.ts ADD: Import private keys in hex or base64 formats 2026-05-19 13:18:31 +01:00
lightning-ark-wallet.ts ADD: native ark-to-ark transfers 2026-02-10 09:51:43 +00:00
lightning-custodian-wallet.ts REF: speed up ark wallet 2025-11-24 16:22:06 +00:00
multisig-hd-wallet.ts ref: replace Buffer with Uint8Array in some internal structures 2026-01-15 13:20:42 +00:00
segwit-bech32-wallet.ts REF: Replace buffer with Uint8Array 2025-10-30 19:24:05 +00:00
segwit-p2sh-wallet.ts REF: Replace buffer with Uint8Array 2025-10-30 19:24:05 +00:00
slip39-wallets.ts ref: replace Buffer with Uint8Array in some internal structures 2026-01-15 13:20:42 +00:00
taproot-wallet.ts FIX: taproot address unwrap from wif 2025-09-17 18:45:49 +01:00
types.ts FIX: ElectrumTransaction confirmation fields are optional until mined (#8093) 2026-05-28 09:43:46 +01:00
watch-only-wallet.ts feat: redesigned wallet details (#8301) 2026-05-21 09:12:49 +02:00