Problem
The xdr-parser.ts file handles critical logic converting raw Soroban results into readable data, but currently lacks any unit tests to ensure it doesn't fail on complex structures.
Expected behavior
A new test suite provides base64 XDR strings of different types (i128, boolean, simple strings) and asserts that parseSorobanResult outputs the expected native TypeScript values.
Files to update
tests/xdr-parser.test.ts (create)
Project relevance
Parsing blockchain data correctly is the core function of the SDK middleware. Testing this ensures the frontend never displays corrupted data.
Acceptance criteria
Problem
The
xdr-parser.tsfile handles critical logic converting raw Soroban results into readable data, but currently lacks any unit tests to ensure it doesn't fail on complex structures.Expected behavior
A new test suite provides base64 XDR strings of different types (i128, boolean, simple strings) and asserts that
parseSorobanResultoutputs the expected native TypeScript values.Files to update
tests/xdr-parser.test.ts(create)Project relevance
Parsing blockchain data correctly is the core function of the SDK middleware. Testing this ensures the frontend never displays corrupted data.
Acceptance criteria