@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.mjs CHANGED
@@ -4498,7 +4498,6 @@ Supported fuel-core version: ${supportedVersion}.`
4498
4498
  * @param sendTransactionParams - The provider send transaction parameters (optional).
4499
4499
  * @returns A promise that resolves to the transaction response object.
4500
4500
  */
4501
- // #region Provider-sendTransaction
4502
4501
  async sendTransaction(transactionRequestLike, { estimateTxDependencies = true } = {}) {
4503
4502
  const transactionRequest = transactionRequestify(transactionRequestLike);
4504
4503
  if (estimateTxDependencies) {
@@ -5040,10 +5039,18 @@ Supported fuel-core version: ${supportedVersion}.`
5040
5039
  if (!transaction) {
5041
5040
  return null;
5042
5041
  }
5043
- return new TransactionCoder5().decode(
5044
- arrayify11(transaction.rawPayload),
5045
- 0
5046
- )?.[0];
5042
+ try {
5043
+ return new TransactionCoder5().decode(
5044
+ arrayify11(transaction.rawPayload),
5045
+ 0
5046
+ )?.[0];
5047
+ } catch (error) {
5048
+ if (error instanceof FuelError14 && error.code === ErrorCode13.UNSUPPORTED_TRANSACTION_TYPE) {
5049
+ console.warn("Unsupported transaction type encountered");
5050
+ return null;
5051
+ }
5052
+ throw error;
5053
+ }
5047
5054
  }
5048
5055
  /**
5049
5056
  * Retrieves transactions based on the provided pagination arguments.
@@ -5055,9 +5062,17 @@ Supported fuel-core version: ${supportedVersion}.`
5055
5062
  transactions: { edges, pageInfo }
5056
5063
  } = await this.operations.getTransactions(paginationArgs);
5057
5064
  const coder = new TransactionCoder5();
5058
- const transactions = edges.map(
5059
- ({ node: { rawPayload } }) => coder.decode(arrayify11(rawPayload), 0)[0]
5060
- );
5065
+ const transactions = edges.map(({ node: { rawPayload } }) => {
5066
+ try {
5067
+ return coder.decode(arrayify11(rawPayload), 0)[0];
5068
+ } catch (error) {
5069
+ if (error instanceof FuelError14 && error.code === ErrorCode13.UNSUPPORTED_TRANSACTION_TYPE) {
5070
+ console.warn("Unsupported transaction type encountered");
5071
+ return null;
5072
+ }
5073
+ throw error;
5074
+ }
5075
+ }).filter((tx) => tx !== null);
5061
5076
  return { transactions, pageInfo };
5062
5077
  }
5063
5078
  /**