Repository navigation
feat(core): implement ExtendFootprintTTLOp with simulation and fee parsing (#115) - #288
Conversation
…rsing (TegoLabs#115) Complete the ExtendFootprintTTLOp transaction building pipeline: - Add `feeCharged` to `SubmitTransactionResult`: capture the actual fee paid by parsing `feeCharged` from the Stellar RPC getTransaction response inside `pollTransaction` - Add `feeCharged` to `ExtensionResult` and thread it through `extendEntries` so callers receive both the tx hash and actual fee charged Tests added in tests/rpc/client.test.ts: - simulateExtension returns minResourceFee for footprint estimation - simulateExtension propagates RPC error on failure - submitExtension calls simulateTransaction before sendTransaction (order verified) - submitExtension parses feeCharged from successful transaction result - submitExtension returns feeCharged as undefined when absent from result Tests added in tests/core/extension.test.ts: - extendEntries propagates feeCharged from submitted transaction result - simulateExtension delegates to RPC client and returns estimated fee
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ 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 |
|
@daveades Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| - | - | Generic High Entropy Secret | 3dd17ce | tests/core/vault.test.ts | View secret |
| - | - | Generic High Entropy Secret | 3dd17ce | tests/core/vault.test.ts | View secret |
| - | - | Generic High Entropy Secret | 3dd17ce | tests/core/vault.test.ts | View secret |
| - | - | Generic High Entropy Secret | b59bef4 | tests/core/vault.test.ts | View secret |
| - | - | Generic High Entropy Secret | b59bef4 | tests/core/vault.test.ts | View secret |
| - | - | Generic High Entropy Secret | b59bef4 | tests/core/vault.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
…rsing (#115) (#288) Complete the ExtendFootprintTTLOp transaction building pipeline: - Add `feeCharged` to `SubmitTransactionResult`: capture the actual fee paid by parsing `feeCharged` from the Stellar RPC getTransaction response inside `pollTransaction` - Add `feeCharged` to `ExtensionResult` and thread it through `extendEntries` so callers receive both the tx hash and actual fee charged Tests added in tests/rpc/client.test.ts: - simulateExtension returns minResourceFee for footprint estimation - simulateExtension propagates RPC error on failure - submitExtension calls simulateTransaction before sendTransaction (order verified) - submitExtension parses feeCharged from successful transaction result - submitExtension returns feeCharged as undefined when absent from result Tests added in tests/core/extension.test.ts: - extendEntries propagates feeCharged from submitted transaction result - simulateExtension delegates to RPC client and returns estimated fee Co-authored-by: dave <jesugbohunmi23@mail.com>
…rsing (#115) (#288) Complete the ExtendFootprintTTLOp transaction building pipeline: - Add `feeCharged` to `SubmitTransactionResult`: capture the actual fee paid by parsing `feeCharged` from the Stellar RPC getTransaction response inside `pollTransaction` - Add `feeCharged` to `ExtensionResult` and thread it through `extendEntries` so callers receive both the tx hash and actual fee charged Tests added in tests/rpc/client.test.ts: - simulateExtension returns minResourceFee for footprint estimation - simulateExtension propagates RPC error on failure - submitExtension calls simulateTransaction before sendTransaction (order verified) - submitExtension parses feeCharged from successful transaction result - submitExtension returns feeCharged as undefined when absent from result Tests added in tests/core/extension.test.ts: - extendEntries propagates feeCharged from submitted transaction result - simulateExtension delegates to RPC client and returns estimated fee Co-authored-by: dave <jesugbohunmi23@mail.com>
Summary
feeChargedinSubmitTransactionResult:pollTransactionnow parsesfeeChargedfrom the Stellar RPCgetTransactionresponse and includes it in every successful submit resultfeeChargedinExtensionResult:extendEntriesthreads the actual fee charged through so callers get back tx hash, ledger, and fee paid in one result objectfeeChargedfield distinction:estimatedFee(fromsimulateExtension) remains the pre-submission estimate;feeChargedis the post-submission actual costNew tests
tests/rpc/client.test.ts—ExtendFootprintTTLOp — Simulation and Fee ParsingsimulateExtensionreturnsminResourceFeefrom footprint simulationsimulateExtensionpropagates RPC error on failuresubmitExtensioncallssimulateTransactionbeforesendTransaction(call order asserted via spy invocation indices)submitExtensionparsesfeeChargedfrom the successful transaction resultsubmitExtensionreturnsfeeChargedasundefinedwhen the field is absent from the RPC responsetests/core/extension.test.ts— additions toextendEntriesandsimulateExtensionextendEntriespropagatesfeeChargedfrom the submitted transaction resultsimulateExtensiondelegates to the RPC client and surfaces the estimated fee asestimatedFeeTest plan
54test files)feeCharged: 1234on thegetTransactionresponsefeeChargedabsent from result →undefined(notNaN)Closes #115