Skip to content

Commit

Permalink
chore: reset latestUtxo each submit
Browse files Browse the repository at this point in the history
  • Loading branch information
yHSJ committed Dec 3, 2024
1 parent b3ed687 commit 303e59f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/HydraMultiplayer/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/hydra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 303e59f

Please sign in to comment.