-
Notifications
You must be signed in to change notification settings - Fork 5k
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 web3config setconfig #6555
fix web3config setconfig #6555
Conversation
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Deploying with Cloudflare Pages
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6555 +/- ##
==========================================
- Coverage 89.56% 89.48% -0.08%
==========================================
Files 215 215
Lines 8251 8276 +25
Branches 2234 2242 +8
==========================================
+ Hits 7390 7406 +16
- Misses 861 870 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
need to write a few more tests for this |
} | ||
}); | ||
|
||
it('should be send transaction, change for defaultTransactionType and sucesfully send transaction with different type', async () => { |
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.
also add tests for other imp configs like contractDataInputFill
at web3 level here for all possible values,
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.
i agree, will create another issue because we have alot of configs and will be time consuming
#6575
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.
pls check unit tests before merging, I think increase time of https://github.com/web3/web3.js/actions/runs/6766378149/job/18387434728?pr=6555#step:5:302
@jdevcs changed the timings to be higher didn't work and moved them to async functions didn't either. these are inconsistent test cases and should be changed/investigated |
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.
I think the CHANGELOG.md could be updated during another PR. But with giving the correct PR number.
Thanks,
const keys = Object.keys(options) as (keyof Web3ConfigOptions)[]; | ||
for (const key of keys) { | ||
this._triggerConfigChange(key, options[key]) | ||
} |
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.
Would you, please, mention this in the CHANGELOG.md.
if (contractContext instanceof Web3Context) { | ||
contractContext.on(Web3ConfigEvent.CONFIG_CHANGE, event => { | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
this.setConfig({ [event.name]: event.newValue }); | ||
}); | ||
} |
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.
Would you, please, update the CHANGELOG.md?
* add web3config * fix config to emit properly * fix lint * fix testcases and change emit for contracts * fix lint * remove unneccesary code * update tests * remove test * update changelog and format * update changelog * fix contracts creation in web3 package * fix linter * format * format * add validation * add test and address feedback * update changelog * update tests * update * fix tests * update test * update time * add promises to fix parallel tests * revert
Description
#6503
This PR fixes:
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change
Checklist:
npm run lint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:coverage
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.