queueErrorPrecedesPersistence function

bool queueErrorPrecedesPersistence(
  1. Object error
)

The queue twin of sendErrorPrecedesPersistence, for queueSend (Wallet::queue_send_uri → queue_send → intent_store::enqueue): WalletBusy and WatchOnly are the entry gates, and QueuedSendsFull is the cap checked inside the enqueue transaction BEFORE its insert. Every SQLite-classified kind is left out: this layer cannot tell a fault before the insert from one at the commit.

Implementation

bool queueErrorPrecedesPersistence(Object error) =>
    error is WalletApiError &&
    switch (error.kind) {
      WalletErrorKind_WatchOnly() ||
      WalletErrorKind_WalletBusy() ||
      WalletErrorKind_QueuedSendsFull() => true,
      _ => false,
    };