@fuel-ts/account 0.94.1 → 0.94.3

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.
@@ -4686,7 +4686,6 @@ Supported fuel-core version: ${supportedVersion}.`
4686
4686
  * @param sendTransactionParams - The provider send transaction parameters (optional).
4687
4687
  * @returns A promise that resolves to the transaction response object.
4688
4688
  */
4689
- // #region Provider-sendTransaction
4690
4689
  async sendTransaction(transactionRequestLike, { estimateTxDependencies = true } = {}) {
4691
4690
  const transactionRequest = transactionRequestify(transactionRequestLike);
4692
4691
  if (estimateTxDependencies) {
@@ -5228,10 +5227,18 @@ Supported fuel-core version: ${supportedVersion}.`
5228
5227
  if (!transaction) {
5229
5228
  return null;
5230
5229
  }
5231
- return new import_transactions20.TransactionCoder().decode(
5232
- (0, import_utils26.arrayify)(transaction.rawPayload),
5233
- 0
5234
- )?.[0];
5230
+ try {
5231
+ return new import_transactions20.TransactionCoder().decode(
5232
+ (0, import_utils26.arrayify)(transaction.rawPayload),
5233
+ 0
5234
+ )?.[0];
5235
+ } catch (error) {
5236
+ if (error instanceof import_errors16.FuelError && error.code === import_errors16.ErrorCode.UNSUPPORTED_TRANSACTION_TYPE) {
5237
+ console.warn("Unsupported transaction type encountered");
5238
+ return null;
5239
+ }
5240
+ throw error;
5241
+ }
5235
5242
  }
5236
5243
  /**
5237
5244
  * Retrieves transactions based on the provided pagination arguments.
@@ -5243,9 +5250,17 @@ Supported fuel-core version: ${supportedVersion}.`
5243
5250
  transactions: { edges, pageInfo }
5244
5251
  } = await this.operations.getTransactions(paginationArgs);
5245
5252
  const coder = new import_transactions20.TransactionCoder();
5246
- const transactions = edges.map(
5247
- ({ node: { rawPayload } }) => coder.decode((0, import_utils26.arrayify)(rawPayload), 0)[0]
5248
- );
5253
+ const transactions = edges.map(({ node: { rawPayload } }) => {
5254
+ try {
5255
+ return coder.decode((0, import_utils26.arrayify)(rawPayload), 0)[0];
5256
+ } catch (error) {
5257
+ if (error instanceof import_errors16.FuelError && error.code === import_errors16.ErrorCode.UNSUPPORTED_TRANSACTION_TYPE) {
5258
+ console.warn("Unsupported transaction type encountered");
5259
+ return null;
5260
+ }
5261
+ throw error;
5262
+ }
5263
+ }).filter((tx) => tx !== null);
5249
5264
  return { transactions, pageInfo };
5250
5265
  }
5251
5266
  /**