Replace stringly-typed patterns with enums and consolidate tests #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_enhancements"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Comprehensive refactoring to eliminate DRY violations, replace error-prone string comparisons with type-safe enums, and remove dead code. All changes are pure refactoring — no behavioral changes.
Changes
TxStatusenum intx_store.rs, updateget_status()return type and all match sites inbridge.rsandcli.rsEventTypeenum inchain/mod.rs, replaceStringfield onChainEventand all handlermatches()methodsHandlerResultenum inhandlers/mod.rs, replaceResult<String>return type onEventHandler::handle()andstrip_prefixdetection in bridgeConfig::test_default()behind#[cfg(test)], replace 5 duplicatetest_config()functions with struct-update syntaxMockSignerintosrc/testing.rs, remove duplicates from handler test modulesTftToSporeHandler::new()andNodeRegisterHandler::new()synchronousis_processed(),has_valid_near_account_memo(),get_transfer_by_hash(), unused getters,Result<T>aliasRelated Issues