AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
341 stars 44 forks source link

write newSwap TX ID to database as soon as TX is sent to mempool #443

Closed dimalinux closed 1 year ago

dimalinux commented 1 year ago

Unexpected things can happen in production like a NewSwap transaction getting mined 2 hours after it was sent. We should save the TX ID to the database before waiting for its receipt, so out tooling still help the user make a refund if the TX gets mined, even if swapd is shutdown before the TX is included in a block.