From 303e59f5f94dd3fc436727834b801e5213ae39ea Mon Sep 17 00:00:00 2001 From: yHSJ Date: Tue, 3 Dec 2024 16:19:38 -0500 Subject: [PATCH] chore: reset latestUtxo each submit --- src/utils/HydraMultiplayer/base.ts | 6 ++++-- src/utils/hydra.ts | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/utils/HydraMultiplayer/base.ts b/src/utils/HydraMultiplayer/base.ts index b0010e33..0ea9d8c7 100644 --- a/src/utils/HydraMultiplayer/base.ts +++ b/src/utils/HydraMultiplayer/base.ts @@ -76,9 +76,11 @@ export abstract class HydraMultiplayer { await this.selectUTxO(); const datum = encodePackets(this.packetQueue); - const [newUTxO, tx] = this.buildTx(datum); + const [_, tx] = this.buildTx(datum); await this.hydra.submitTx(tx); - this.latestUTxO = newUTxO; + // Refetch the latestUtxO everytime to determine if that's the issue + this.latestUTxO = null; + // this.latestUTxO = newUTxO; this.packetQueue = []; } diff --git a/src/utils/hydra.ts b/src/utils/hydra.ts index 251429a6..a4f27e85 100644 --- a/src/utils/hydra.ts +++ b/src/utils/hydra.ts @@ -235,6 +235,7 @@ export class Hydra { const txId = txParsed.body().hash(); this.tx_timings[txId] = { sent: performance.now() }; this.tx_count++; + this.connection.send( JSON.stringify({ tag: "NewTx",