@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.
@@ -4667,7 +4667,6 @@ Supported fuel-core version: ${supportedVersion}.`
4667
4667
  * @param sendTransactionParams - The provider send transaction parameters (optional).
4668
4668
  * @returns A promise that resolves to the transaction response object.
4669
4669
  */
4670
- // #region Provider-sendTransaction
4671
4670
  async sendTransaction(transactionRequestLike, { estimateTxDependencies = true } = {}) {
4672
4671
  const transactionRequest = transactionRequestify(transactionRequestLike);
4673
4672
  if (estimateTxDependencies) {
@@ -5209,10 +5208,18 @@ Supported fuel-core version: ${supportedVersion}.`
5209
5208
  if (!transaction) {
5210
5209
  return null;
5211
5210
  }
5212
- return new TransactionCoder5().decode(
5213
- arrayify12(transaction.rawPayload),
5214
- 0
5215
- )?.[0];
5211
+ try {
5212
+ return new TransactionCoder5().decode(
5213
+ arrayify12(transaction.rawPayload),
5214
+ 0
5215
+ )?.[0];
5216
+ } catch (error) {
5217
+ if (error instanceof FuelError15 && error.code === ErrorCode13.UNSUPPORTED_TRANSACTION_TYPE) {
5218
+ console.warn("Unsupported transaction type encountered");
5219
+ return null;
5220
+ }
5221
+ throw error;
5222
+ }
5216
5223
  }
5217
5224
  /**
5218
5225
  * Retrieves transactions based on the provided pagination arguments.
@@ -5224,9 +5231,17 @@ Supported fuel-core version: ${supportedVersion}.`
5224
5231
  transactions: { edges, pageInfo }
5225
5232
  } = await this.operations.getTransactions(paginationArgs);
5226
5233
  const coder = new TransactionCoder5();
5227
- const transactions = edges.map(
5228
- ({ node: { rawPayload } }) => coder.decode(arrayify12(rawPayload), 0)[0]
5229
- );
5234
+ const transactions = edges.map(({ node: { rawPayload } }) => {
5235
+ try {
5236
+ return coder.decode(arrayify12(rawPayload), 0)[0];
5237
+ } catch (error) {
5238
+ if (error instanceof FuelError15 && error.code === ErrorCode13.UNSUPPORTED_TRANSACTION_TYPE) {
5239
+ console.warn("Unsupported transaction type encountered");
5240
+ return null;
5241
+ }
5242
+ throw error;
5243
+ }
5244
+ }).filter((tx) => tx !== null);
5230
5245
  return { transactions, pageInfo };
5231
5246
  }
5232
5247
  /**