Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Duplicate transactions with transactionStatuses #1200

@VadimSaveljev

Description

@VadimSaveljev

'sent' is an ExtrinsicStatusRune here

sent.transactionStatuses((status) => {
  if (status === 'ready') {
    setStatus(...);
  }

  return false;
}).run();
            
const inBlockEvents = await sent.inBlockEvents().run();

So this code breaks if I cancel the transaction, even though it's in a try catch block
The initial fix was to add await
await sent.transactionStatuses
but then it will be stuck forever, unless I add return true

   if (status === 'ready') {
    setStatus(...);
    
    return true;
  }

unfortunately this creates a new issue, now the first transaction will be called twice in a row
I receive a popup two times, after confirming the second one, only then it proceeds further

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions