Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

feat(web3.js): add support for get stake minimum delegation#26682

Merged
steveluscher merged 1 commit intosolana-labs:masterfrom
atharmohammad:issue#26564
Jul 22, 2022
Merged

feat(web3.js): add support for get stake minimum delegation#26682
steveluscher merged 1 commit intosolana-labs:masterfrom
atharmohammad:issue#26564

Conversation

@atharmohammad
Copy link
Copy Markdown
Contributor

The PR adds --
1). support for getStakeMinimumDelegation to web3.js with a test.

fixes #26564

@mergify mergify Bot added the community Community contribution label Jul 19, 2022
@mergify mergify Bot requested a review from a team July 19, 2022 18:35
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 19, 2022

Codecov Report

Merging #26682 (9178ded) into master (1165a7f) will decrease coverage by 4.4%.
The diff coverage is n/a.

❗ Current head 9178ded differs from pull request most recent head 9ae40f6. Consider uploading reports for the commit 9ae40f6 to get more accurate results

@@             Coverage Diff             @@
##           master   #26682       +/-   ##
===========================================
- Coverage    81.9%    77.4%     -4.5%     
===========================================
  Files         631       42      -589     
  Lines      174252     2459   -171793     
  Branches        0      353      +353     
===========================================
- Hits       142728     1905   -140823     
+ Misses      31524      422    -31102     
- Partials        0      132      +132     

@atharmohammad atharmohammad force-pushed the issue#26564 branch 4 times, most recently from ef8d7bf to 8602516 Compare July 20, 2022 18:44
Copy link
Copy Markdown
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Comment thread web3.js/src/connection.ts Outdated
Comment thread web3.js/test/connection.test.ts Outdated
Comment thread web3.js/test/stake-program.test.ts Outdated
@mergify mergify Bot dismissed steveluscher’s stale review July 21, 2022 06:03

Pull request has been modified.

@mergify mergify Bot requested a review from a team July 21, 2022 06:04
@atharmohammad atharmohammad marked this pull request as ready for review July 21, 2022 06:11
Comment thread web3.js/src/connection.ts Outdated
* get the stake minimum delegation
*/
async getStakeMinimumDelegation(
commitment?: Commitment,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close! I really did mean to take a config object here, even if for now it only contains a single property. This makes the method call future proof; if we need to add another property then we have a place to do it. There are other examples in this file of calls that take a config. Check it out!

Optional config, optional commitment property inside.

@mergify mergify Bot dismissed steveluscher’s stale review July 21, 2022 19:53

Pull request has been modified.

@mergify mergify Bot requested a review from a team July 21, 2022 19:53
Copy link
Copy Markdown
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Community contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to get stake minimum delegation from web3.js

2 participants