Irys-xyz / arweave-js-sdk

JS SDK for Irys on Arweave
111 stars 96 forks source link

fix: :bug: Aptos: Add Aptos network tx mutex to prevent sequence number collisions #98

Closed JesseTheRobot closed 1 year ago

JesseTheRobot commented 1 year ago

This PR fixes an issue caused by creating & dispatching multiple Aptos network Txs in a short period of time, causing 'later' transactions to outright fail due to the sequence number overlapping. The chosen fix is a simple async mutex, that locks createTx until the tx has been dispatched and confirmed to the network.