fix(resilience): wrap Horizon calls in retry/circuit-breaker for mult… - #1070
Merged
Mystery-CLI merged 1 commit intoAug 3, 2026
Conversation
…iSig, trustlines, pathPayment Closes Ethereal-Future#944, Ethereal-Future#945, Ethereal-Future#946 ## Ethereal-Future#944 — multiSig.js Horizon resilience - Import withHorizonRetry and extractStellarErrorCode/getStellarErrorInfo from stellar.js/stellarErrors.js - Wrap all getHorizonServer().loadAccount() and .submitTransaction() calls in withHorizonRetry() in createMultiSigAccount, buildMultiSigTransaction, submitMultiSigTransaction, getMultiSigConfig, and updateMultiSigConfig - Map caught Horizon errors through extractStellarErrorCode/getStellarErrorInfo before re-throwing so callers receive user-friendly messages matching the pattern already used by sendPayment - expireStaleTransactions and getPendingTransactions (Prisma-only) left as-is ## Ethereal-Future#945 — Trustline consolidation - Add updateTrustlineLimit() to stellar.js with withHorizonRetry and TrustlineLimitUpdated event emission - Add batchCreateTrustlines() to stellar.js delegating to createTrustline() with per-asset success/failure collection - Extend createTrustline() signature to accept optional assetIssuer and limit parameters (backward-compatible; falls back to config/assets.js registry) - Migrate routes/assets.js off TrustlineManagerService to stellar.js functions - Migrate routes/stellar/trustline-balance.js off trustline.js to stellar.js - Add @deprecated banners + console.warn() to trustlineManager.js, trustline.js ## Ethereal-Future#946 — pathPayment.js resilience - Remove private _server/getServer() singleton; use shared getHorizonServer() - Wrap all Horizon calls with withHorizonRetry() - Eliminate duplicate findPaths() call in sendPathPayment - Map errors through extractStellarErrorCode/getStellarErrorInfo ## Tests - Update multiSig.test.js stellar.js mock to expose withHorizonRetry - Add resilience suites to multiSig.test.js (retry-then-succeed, error mapping, Prisma-only functions confirmed unaffected) - Add backend/tests/issues-944-946.test.js covering updateTrustlineLimit, batchCreateTrustlines, and pathPayment resilience + error mapping
|
@Good-Coded 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…iSig, trustlines, pathPayment
closes #944 — multiSig.js Horizon resilience
closes #945 — Trustline consolidation
closes #946 — pathPayment.js resilience
Tests