@fuel-ts/account 0.94.2 → 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.
package/dist/index.js CHANGED
@@ -4656,7 +4656,6 @@ Supported fuel-core version: ${supportedVersion}.`
4656
4656
  * @param sendTransactionParams - The provider send transaction parameters (optional).
4657
4657
  * @returns A promise that resolves to the transaction response object.
4658
4658
  */
4659
- // #region Provider-sendTransaction
4660
4659
  async sendTransaction(transactionRequestLike, { estimateTxDependencies = true } = {}) {
4661
4660
  const transactionRequest = transactionRequestify(transactionRequestLike);
4662
4661
  if (estimateTxDependencies) {
@@ -5198,10 +5197,18 @@ Supported fuel-core version: ${supportedVersion}.`
5198
5197
  if (!transaction) {
5199
5198
  return null;
5200
5199
  }
5201
- return new import_transactions20.TransactionCoder().decode(
5202
- (0, import_utils24.arrayify)(transaction.rawPayload),
5203
- 0
5204
- )?.[0];
5200
+ try {
5201
+ return new import_transactions20.TransactionCoder().decode(
5202
+ (0, import_utils24.arrayify)(transaction.rawPayload),
5203
+ 0
5204
+ )?.[0];
5205
+ } catch (error) {
5206
+ if (error instanceof import_errors15.FuelError && error.code === import_errors15.ErrorCode.UNSUPPORTED_TRANSACTION_TYPE) {
5207
+ console.warn("Unsupported transaction type encountered");
5208
+ return null;
5209
+ }
5210
+ throw error;
5211
+ }
5205
5212
  }
5206
5213
  /**
5207
5214
  * Retrieves transactions based on the provided pagination arguments.
@@ -5213,9 +5220,17 @@ Supported fuel-core version: ${supportedVersion}.`
5213
5220
  transactions: { edges, pageInfo }
5214
5221
  } = await this.operations.getTransactions(paginationArgs);
5215
5222
  const coder = new import_transactions20.TransactionCoder();
5216
- const transactions = edges.map(
5217
- ({ node: { rawPayload } }) => coder.decode((0, import_utils24.arrayify)(rawPayload), 0)[0]
5218
- );
5223
+ const transactions = edges.map(({ node: { rawPayload } }) => {
5224
+ try {
5225
+ return coder.decode((0, import_utils24.arrayify)(rawPayload), 0)[0];
5226
+ } catch (error) {
5227
+ if (error instanceof import_errors15.FuelError && error.code === import_errors15.ErrorCode.UNSUPPORTED_TRANSACTION_TYPE) {
5228
+ console.warn("Unsupported transaction type encountered");
5229
+ return null;
5230
+ }
5231
+ throw error;
5232
+ }
5233
+ }).filter((tx) => tx !== null);
5219
5234
  return { transactions, pageInfo };
5220
5235
  }
5221
5236
  /**