Skip to content

feat(vault): keep refund transaction links after confirmation - #2664

Open
jonybur wants to merge 1 commit into
mainfrom
feat/vault-refund-transaction-link
Open

jonybur wants to merge 1 commit into
mainfrom
feat/vault-refund-transaction-link

Conversation

@jonybur

@jonybur jonybur commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

Inactive Vaults keeps refund transaction hashes visible before and after confirmation. The refund success dialog also shows the hash and a copy control. The branch includes current main. Fresh CI and Jerome's approval are pending.

Change

  • Keep completed refunds in Inactive Vaults.
  • Cache confirmed refund hashes and exclude confirmed refunds from further polling.
  • Keep pending broadcast hashes available for display.
  • Resolve conflicts with the current phone and vault recovery changes.
  • Make the refund review test wait for the price to load before checking it.

Safety

The hash is for display. Existing action checks block a second withdrawal. Invalid hashes and known PegIn hashes are omitted. Old timestamp-only cache entries remain valid. Cache expiry stays unchanged. An in-session reorganization does not restart polling. Current phone link rules and the open redeem success dialog remain supported.

Verification

  • Full vault suite: 5,096 passed, two skipped. After the test timing fix, all 11 refund modal tests passed.
  • Six refund screen checks passed across desktop, 390 px, and 360 px widths.
  • Vault lint and type checks passed. Lint reports 138 warnings and no errors.
  • All three PR updates merge together without conflicts. The combined vault suite passed 5,102 tests, with two skipped.
  • A live wallet refund remains untested. Fresh GitHub CI must pass before merge.

Links

The following record is from the earlier review. The checks above cover this update.

Pre-review: 1 finding · 1 fixed · 0 open (0 merge-blockers) · 0 undecided · lint/test passed

Full review covered all 21 changed files. Uncached affected lint and tests passed. No source file was rewritten by the checks.

# Finding Severity Outcome
1 Unused explorer button label normal fixed

@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

🔐 Commit Signature Verification

✅ All 1 commit(s) passed verification

Commit Author Signature Key Type Key Check
d7906f7a5ab2 Jonathan Bursztyn ✅ sk-ssh-ed25519 ✅

Summary

  • Commits verified: 1
  • Signature check: ✅ All passed
  • Key type enforcement: ✅ All sk-ssh-ed25519

Required key type: sk-ssh-ed25519 (FIDO2 hardware key)

Last verified: 2026-10-08 23:43 UTC

@jonybur
jonybur marked this pull request as ready for review September 30, 2026 17:02
gbarkhatov
gbarkhatov previously approved these changes Sep 30, 2026
@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Medium risk] Adds refund transaction tracking to the deposit activity feed.

The PR appears safe to merge with non-blocking corrections to refund-row timing, hash-path coverage, and stale-link handling.

Findings

  1. P2 Refunds appear under deposit dates ▶
  2. P2 Visual test bypasses hash selection ▶
  3. P2 Cached links can become stale ▶

Summary

The PR carries refund transaction hashes from broadcast and HTLC polling into Activity, retains confirmed hashes across reloads, and creates a refund row when indexed history lacks a deposit row. It also adds desktop and mobile visual captures.

  • Synthetic rows should use refund timing rather than deposit timing.
  • The new hash paths need direct tests, and confirmed links need in-session revalidation after a reorganization.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Broadcast[Refund broadcast] --> Pending[Address-scoped pending record]
  Outspend[HTLC outspend polling] --> Result[Deposit polling result]
  Pending --> Result
  Outspend --> Cache[Confirmed refund cache]
  Cache --> Result
  Result --> Activity[Indexed or synthetic Activity row]
  Activity --> Mempool[Mempool transaction link]
Loading

Reviews (1) · Last reviewed commit: "feat(vault): link refund transactions to..."

Comment thread services/vault/src/components/Activity/ActivityListWithRefund.tsx Outdated
Comment thread services/vault/e2e/visual/activityRefund.visual.spec.ts Outdated
Comment thread services/vault/src/context/deposit/PeginPollingContext.tsx Outdated
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Visual regression

🖼️ 6 of 447 screens render differently than the merge-base.

vault - 6 of 117 screens changed

vaults-refunded - 3 screens, 3 size-changed

desktop - 1280x800 to 1280x826 - before on top, after underneath

vaults-refunded--desktop, merge-base on top and this PR underneath

mobile-360 - 360x1014 to 360x1280 - before on the left, after on the right

vaults-refunded--mobile-360, merge-base on the left and this PR on the right

1 more changed screen in this group - listed in full below.

vaults-refunding - 3 screens, 3 size-changed

desktop - 1280x800 to 1280x826 - before on top, after underneath

vaults-refunding--desktop, merge-base on top and this PR underneath

mobile-360 - 360x1014 to 360x1280 - before on the left, after on the right

vaults-refunding--mobile-360, merge-base on the left and this PR on the right

1 more changed screen in this group - listed in full below.

All 6 changed screens
### vault
6 of 117 screens changed:
  size-changed  vaults-refunded--desktop.png
  size-changed  vaults-refunded--mobile-360.png
  size-changed  vaults-refunded--mobile.png
  size-changed  vaults-refunding--desktop.png
  size-changed  vaults-refunding--mobile-360.png
  size-changed  vaults-refunding--mobile.png
### storybook
No visual changes across 330 screens.

4 screens pictured, cropped to the part that changed, published at most 960px wide so the set fits in a comment - a sample across the worst-hit groups on each surface, not a ranking. Full-resolution before / after / diff for every screen: open the run, download visual-report, open index.html.

If these changes are intentional there is nothing to update - this repo stores no baseline images. The baseline is recomputed from the merge-base on every run.

Compared d7906f7a5ab2061d13d64c897fd8ff8cbfdafe8d against the merge-base. Images are pruned when this pull request closes.

github-actions Bot added a commit that referenced this pull request Sep 30, 2026
@jonybur jonybur changed the title feat(vault): link refund transactions to mempool feat(vault): show refund transactions in inactive vaults Sep 30, 2026
github-actions Bot added a commit that referenced this pull request Sep 30, 2026
gbarkhatov
gbarkhatov previously approved these changes Sep 30, 2026
@jonybur jonybur changed the title feat(vault): show refund transactions in inactive vaults feat(vault): keep refund transaction links after confirmation Sep 30, 2026
github-actions Bot added a commit that referenced this pull request Sep 30, 2026
gbarkhatov
gbarkhatov previously approved these changes Sep 30, 2026

@jrwbabylonlab jrwbabylonlab left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good. One thing: this keeps every refunded vault in the mempool poll forever. Can we store the refund txid in the refunded cache instead and keep excluding confirmed ones from the poll?

@jonybur
jonybur force-pushed the feat/vault-refund-transaction-link branch from 2501168 to d7906f7 Compare October 8, 2026 23:43
github-actions Bot added a commit that referenced this pull request Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants