Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty operation being returned in txSummary #2763

Closed
LuizAsFight opened this issue Jul 12, 2024 · 0 comments · Fixed by #2782
Closed

Empty operation being returned in txSummary #2763

LuizAsFight opened this issue Jul 12, 2024 · 0 comments · Fixed by #2782
Assignees
Labels
bug Issue is a bug

Comments

@LuizAsFight
Copy link
Contributor

LuizAsFight commented Jul 12, 2024

What version of fuels-ts are you using?

0.92.0

Steps to Reproduce

do a contract call with an account that only have message to fund the transaction (to do that you can receive from the bridge as funds bridged will be message in fuel side)

Expected Behavior

Should show operations just fine

Actual Behavior

It's doesn't return any operations

Code

I believe this part is the problem: https://github.com/FuelLabs/fuels-ts/blob/master/packages/account/src/providers/transaction-summary/input.ts#L42

this TODO looks like it's not making sense because a message won't have assetId at all, as mentioned in the spec on amount field: "Amount of base asset coins sent with message.".

when it has amount, it's a base asset message
when it hasn't it can be anything, depending on data field

I think on this case it should find by amount instead:

const messageInput = messageInputs.find(
    ({ amount }) => !!amount && amount.gt(0)
  );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants