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

web3.js: When maxRetries is set to zero, it's stripped out #26295

Closed
steveluscher opened this issue Jun 28, 2022 · 5 comments · Fixed by #26345
Closed

web3.js: When maxRetries is set to zero, it's stripped out #26295

steveluscher opened this issue Jun 28, 2022 · 5 comments · Fixed by #26345
Assignees
Labels
bug Something isn't working javascript Pull requests that update Javascript code

Comments

@steveluscher
Copy link
Contributor

Problem

This code will fail to send the maxRetries parameter when it's zero.

https://github.com/solana-labs/solana/blame/89e5640c63a6683c2bd90fb963c837300ece9307/web3.js/src/connection.ts#L4239-L4241

Proposed Solution

Null-check the value, instead of falsey-checking it.

@steveluscher steveluscher added bug Something isn't working javascript Pull requests that update Javascript code labels Jun 28, 2022
@steveluscher
Copy link
Contributor Author

Interested in fixing this one up, @hareeshnagaraj?

@Mark-777-0
Copy link
Contributor

Mark-777-0 commented Jun 29, 2022

I'm new to open source Could I fix this? Would you assign it to me? @steveluscher

@steveluscher
Copy link
Contributor Author

Do it to it, @Mark-777-0!

@Mark-777-0
Copy link
Contributor

On it!

@Mark-777-0
Copy link
Contributor

Mark-777-0 commented Jul 1, 2022

I did a few tests with it and it seems to be working, it's just set up the same way as the statement below it. The PR just follows your proposed solution.

Let me know if I broke any etiquette. Very new to pull requests :). Not sure how to properly link it here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants