createTxInMemoryStore()
createTxInMemoryStore<
T>(params):StoreApi<ITxInMemoryStore<T>>
Defined in: store/txInMemoryStore.ts:119
Creates an in-memory store that shows the remote transaction history of a wallet (for example from Quasar) together
with the local pool of the persistent store. Nothing in it is persisted. Keep it in sync with the persistent store by
calling syncWithLocalPool from that store’s subscribe listener.
Merge rules: a transaction that is Success or Replaced in memory is never overwritten; a pending one is
overwritten only by a terminal transaction or by one with more confirmations; any other one is overwritten.
History pages are validated like injectExternalPendingTxs does: transactions whose title, description or payload
break the safety limits are skipped with a warning and are not passed to onHistoryFetched.
Side effects: fetchInitial and fetchNextPage call getHistory, usually a network request. The store uses its
own Immer instance without auto-freeze and does not change the global Immer configuration.
Type Parameters
T
T extends Transaction
The application transaction type.
Parameters
params
The store configuration.
Returns
StoreApi<ITxInMemoryStore<T>>
A vanilla Zustand store; bind it to React with createBoundedUseStore.