Skip to content

Move the console's compliance transfer to legal transfer #338

Open

Description

@luchobonatti

User story / Problem statement

Currently, the console's compliance transfer calls forced_transfer with the compliance account. The token makes forced_transfer manager-only once #319's contracts land, so the console's transfer fails with Unauthorized on the next deploy.

Expected outcome

Operators sign a compliance transfer with compliance and governance together in one call, through legal_transfer.

Acceptance criteria

  • The compliance transfer calls legal_transfer(from, to, amount, reference, caller) with compliance as caller and the token admin authorizing as a second account
  • The flow collects both authorizations, including the auth entry of the account that is not the source, before submission
  • The form refuses an empty reference or one over 128 bytes
  • Copy for CoSignRequired, InvalidReference, VaultAddress, a recipient that is not allowlisted, and insufficient balance
  • The console no longer calls forced_transfer; /sign maps legal_transfer with its reference
  • Activity reads LegalTransfer and shows the reference

Technical notes

  • app/src/hooks/useComplianceTransactions.ts:43 calls token.forced_transfer
  • app/src/pages/sign.ts:247 maps forced_transfer args
  • legal_transfer(from, to, amount, reference, caller): compliance role plus admin signature, different accounts; reference 1-128 bytes

Additional context

Follow-up to #262 / #319.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions