Skip to content

testing: complex useTransactionHistory hook has no test coverage #853

Description

@Ejirowebfi

Summary

useTransactionHistory contains the app's most intricate client logic (cursor pagination, in-memory cache, debounced refetch, operation parsing) yet has no test file, while simpler utilities are well covered.

Evidence

  • No useTransactionHistory.test.* exists under frontend/src.
  • The hook has multiple latent bugs (see related issues: hardcoded network, broken pagination, filter-blind cache) that tests would have caught.

Suggested fix

Add unit tests with a mocked Horizon response covering: network selection, multi-page loadMore with cursors, cache hits/misses across filter changes, and parseOperation mapping for create/mint/burn. This pairs naturally with fixing the related bugs.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions