fix(transactions): expose tx identifier under both hash and txId#167
fix(transactions): expose tx identifier under both hash and txId#167MuncleUscles wants to merge 1 commit intomainfrom
hash and txId#167Conversation
The same on-chain identifier was being exposed under different field names depending on the chain decoder: - decodeLocalnetTransaction (Studio) only set `hash` - decodeTransaction (testnet) only set `txId` This broke any consumer that didn't know which one to read. Both decoders now populate both fields. `txId` matches the on-chain Solidity struct (source of truth); `hash` is preserved for back-compat with the legacy localnet RPC shape.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The same on-chain identifier was exposed under different field names depending on which decoder ran:
decodeLocalnetTransaction(Studio) only sethashdecodeTransaction(testnet) only settxIdThis broke any consumer that didn't know which one to read — e.g. genlayer-studio's transactions store kept polling but couldn't match the response back to the in-memory entry, leaving the UI stuck on
PENDINGon Bradbury.Both decoders now populate both fields.
txIdmatches the on-chain Solidity struct (source of truth);hashis preserved for back-compat with the legacy localnet RPC shape. The pre-existing// TODO: make localnet compatible with testnet and unify the typescomment intypes/transactions.tsis replaced with a clarifying note.Test plan
npm test -- --runpasses (54 tests)decodeTransaction