Skip to content

Tokens page: status banner still says "Transfer offered" after the offer is accepted #314

Description

@zheli

Summary

After a transfer offer is accepted through the prefilled "Accept transfer" modal, the top status banner keeps showing the earlier Transfer offered. Accept instruction <id>… to settle it. message. The banner instructs the operator to perform an action that has already completed.

All other state on the page updates correctly: holder balances, holder count, holding-contract count, the Offers tab, and the Offers badge.

Environment

  • LocalNet instance: Splice 0.6.12
  • Route: http://127.0.0.1:7777/tokens?instance=<instance>
  • Role: app-provider
  • Instrument: Token Standard V2 (CIP-0112)

Reproduction

  1. Open the Tokens page and select a Token Standard V2 instrument with a funded holder.
  2. Click Transfer, choose a sender and a distinct receiver, enter an amount.
  3. Clear the Auto-accept checkbox and submit.
  4. The transfer is created as an offer. The banner shows Transfer offered. Accept instruction <id>… to settle it. and the prefilled Accept transfer modal opens.
  5. Click Submit in that modal.

Observed result

  • POST /api/tokens/transfers/<id>/accept returns 204.
  • Balances settle correctly (sender debited, receiver credited), holder count increases, and the Offers badge clears.
  • The top banner still reads Transfer offered. Accept instruction <id>… to settle it.

Expected result

On a successful accept, the banner is replaced with a confirmation (for example Transfer accepted.) or cleared.

Cause

frontend/src/screens/TokensScreen.tsx

The Accept ActionModal at line 954 sets:

onDone={() => { setModal(null); bump(); }}

It closes the modal and refetches, but never updates topNotice, so the message set at line 913 by the transfer path persists.

The other accept path in the same file (line 523) does update it:

setTopNotice({ tone: "ok", text: "Transfer accepted." });

The two accept paths are inconsistent.

Suggested fix

Give the Accept modal's onDone the same notice update as the other accept path, so both paths report success identically.

Evidence

Image

Console and network during the run showed no unexpected errors. The only errors were a 503 on metrics/summary (metrics disabled on the instance) and an intentional 400 from a self-mint validation test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions