@argonprotocol/mainchain 1.4.9-dev.0147366f → 1.4.9-dev.083932bc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs CHANGED
@@ -325,7 +325,7 @@ var TxResult = (_class = class {
325
325
  this.isBroadcast = true;
326
326
  if (result2.internalError) this.submissionError = result2.internalError;
327
327
  }
328
- if (status.isInBlock) {
328
+ if (status.isInBlock && txIndex !== void 0) {
329
329
  try {
330
330
  const pendingInBlock = createPendingInBlock(
331
331
  Uint8Array.from(status.asInBlock),
@@ -342,6 +342,23 @@ var TxResult = (_class = class {
342
342
  this.submissionError = error;
343
343
  }
344
344
  }
345
+ if (status.isRetracted) {
346
+ const retractedHash = Uint8Array.from(status.asRetracted);
347
+ if (this.#pendingInBlock && _util.u8aEq.call(void 0, this.#pendingInBlock.blockHash, retractedHash)) {
348
+ this.#pendingInBlock = void 0;
349
+ }
350
+ if (this.blockHash && _util.u8aEq.call(void 0, this.blockHash, retractedHash)) {
351
+ this.events = [];
352
+ this.extrinsicError = void 0;
353
+ this.extrinsicIndex = void 0;
354
+ this.batchInterruptedIndex = void 0;
355
+ this.blockHash = void 0;
356
+ this.blockNumber = void 0;
357
+ this.finalFee = void 0;
358
+ this.finalFeeTip = void 0;
359
+ this.updateProgress();
360
+ }
361
+ }
345
362
  if (status.isUsurped) {
346
363
  this.#pendingInBlock = void 0;
347
364
  this.submissionError = new TxSubmissionError(