Repository navigation
fix(escrow): resolve overlapping return statements in invokeRelease (#485) - #693
Merged
chonilius merged 2 commits intoOct 15, 2026
Merged
Conversation
Keep a single invokeOnLockedEscrow call that carries both the u64-typed issue key (MergeFi#301) and the transaction manager (MergeFi#303), restoring compilation.
splitRelease must send u64(issue_id) and record failures through the locking transaction manager.
|
@alansamdev 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! 🚀 |
|
@alansamdev is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Problem
main@ 50647ca does not compile:EscrowService.invokeReleasecontained both sides of a bad merge:return this.invokeOnLockedEscrow(...)that wraps the issue key inu64(...), andreturn this.invokeOnLockedEscrow(..., manager)that forwards the transaction manager but passes the key as a barebigint.Because of this syntax error,
nest buildfails and nothing onmaincan be deployed. Release, split release and refund are the platform's core money paths, and they all live in this service.Why simply picking one side is wrong
bigintis encoded asScVal::I128, but the contract'srelease(issue_id: u64, recipients)rejects it, so every payout would fail on-chain.manager, a failed invocation writeslastFailurethrough a second connection, and that write blocks on the row lock the same request already holds.What changed
fix(escrow)insrc/escrow/escrow.service.ts:invokeReleaseis now a singleinvokeOnLockedEscrowcall that passesu64(this.onChainKeyFor(escrow))andmanager. The SorobanClientService.toScVal encodes every bigint argument as i128, even where the documented contract signature calls for u64 #301 comment is kept.test(escrow)insrc/escrow/escrow.service.spec.ts: a new regression test on thesplitReleasepath checks both halves at once:args[0]isu64(4850n), not a bare bigint;lastFailure(operationsplitRelease) is saved throughdataSource.manager.save.Verification
npx tsc --noEmit: the TS1135 error inescrow.service.tsis gone.npx jest src/escrow/escrow.service.spec.ts: 58/59 pass, including the new test and the existingu64(8801n)/ manager assertions. The one failure,fund › locks funds…(typeof args[4]expectedbigint), is a separate problem infundthat this PR does not touch.Related: #301, #303
Closes #485
Closes #486
Closes #488
Closes #317