Skip to content

Refactor showTransactionActionSheet, it's buggy #368

@n13

Description

@n13

This is called from many places that don't have the correct information

Notably activeAccount here is the wrong thing.

We want to show the reversible UX for transactions we can reverse.

This could mean any of our accounts, or a guardian account for an entrusted account.

We will have an issue on the multiple accounts transaction list with this - we can reverse all reversible tx, but only ones for the active account will show... or else maybe it will try to cancel using active as the origin, where it should use the sender as origin.

void showTransactionActionSheet(BuildContext context, {required TransactionEvent transaction, required role}) {
  final container = ProviderScope.containerOf(context, listen: false);
  final activeDisplayAccount = container.read(activeAccountProvider).value;
  EntrustedAccount? entrustedAccount;
  if (activeDisplayAccount is EntrustedDisplayAccount) {
    entrustedAccount = activeDisplayAccount.account;
  }
  final isEntrustedAccount = entrustedAccount != null;

  Widget sheet;

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