You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getOperations function and all associated helper functions currently require refactoring and improvements in their logic.
For instance, there is a (potential) recurring issue where the operation variable is reassigned during each iteration of the loop, as can be seen in the following snippet:
It is crucial to ascertain whether this logic properly handles cases like a single transaction that involves the transfer of multiple assets among various addresses.
We can also improve the logic here and stop reassigning the operations variable if only one operation is expected.
Additionally, it is necessary to validate whether transactions of the Create type can in fact generate a Transfer Asset operation:
The
getOperations
function and all associated helper functions currently require refactoring and improvements in their logic.fuels-ts/packages/providers/src/transaction-summary/operations.ts
Lines 317 to 323 in 3c1920e
It is crucial to ascertain whether this logic properly handles cases like a single transaction that involves the transfer of multiple assets among various addresses.
We can also improve the logic here and stop reassigning the
operations
variable if only one operation is expected.Create
type can in fact generate aTransfer Asset
operation:fuels-ts/packages/providers/src/transaction-summary/operations.ts
Lines 408 to 413 in 3c1920e
Proper validation will ensure the reliability and maintainability of this code.
The text was updated successfully, but these errors were encountered: