Skip to content

Need a better example strategy to confirm a transaction is complete. #328

Description

@snowkidind

Regarding:
https://github.com/omgnetwork/omg-js/blob/master/packages/omg-js-util/src/waitForChildchainBalance.js

After playing with this in my integration I've concluded that there are a lot of problems with this, but I will bring forth a couple:

  1. If the recipient address automatically combines UTXO's it might timeout
  2. If the recipient address receives another deposit, withdraw, anything really, during the waiting period the function will timeout.

Suggested fixes:

  1. Allow for polling of pending transactions.
  2. Improve upon this strategy to handle failure cases by checking for other recent transactions, and reacting accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions