-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: calculate transaction fee #1102
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success1073 tests passing in 179 suites. Report generated by 🧪jest coverage report action from 468e3dc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, I believe it came from @camsjams Vector PR, but just in case, I will mention it here — there are a couple of lint annotations:
Lint errors are like:
xyz is defined but never used
Finally, following our last fuel-gauge
discussion about where to put tests and whatnot, should we move the fee.test.ts
over there (to fuel-gauge
) since it's not a unit test?
@arboleya but the tests inside @nedsalk just suggested to make them feature test, so instead of having these unit tests on |
@Torres-ssf Are they unit tests? I thought you were querying the node. Perhaps I got something wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arboleya LGTM as the tests in that file are the calculations that are passed values that would be from the node. Begs the question as to whether we'd want an E2E that tests for a specific gasUsed
and fee
value for a given contract. At a glance most of our tests check that gasUsed
or fee
are at least defined. I don't think such a test is necessary for this piece of work so will leave up to @Torres-ssf 👍🏻
@Torres-ssf @danielbate My bad, I mixed things up. The Unlike the As I said before, I prefer this approach of having the import { Provider } from 'fuels'; Was it me who understood things wrong? I'm not claiming I'm right. But we surely need to clearly define these convention rules to avoid misinterpretations. |
My understanding is that unit tests can remain and will be alongside I plan on defining this more clearly in #1043 once #1079 has been completed and merged. Apologies also I missed the |
@arboleya @danielbate I've only touched on one test case from No test cases were implemented on it. Do you think that moving |
@Torres-ssf I'd be happy to count it as out of scope of this work and instead include it in a provider test refactor piece |
@arboleya @danielbate I've just revet the renaming of a method and query to avoid conflicts with the fuels wallet |
Pretty much what the title says.
The
calculateTransactionFee
method was updated based on the version used byfuels-wallet