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

Network selector: setup for custom headers #1101

Merged
merged 8 commits into from
Nov 6, 2024

Conversation

quietbits
Copy link
Contributor

@quietbits quietbits commented Oct 16, 2024

@stellar-jenkins
Copy link

@quietbits quietbits marked this pull request as draft October 16, 2024 17:57
@quietbits quietbits linked an issue Oct 16, 2024 that may be closed by this pull request
@stellar-jenkins
Copy link

@quietbits
Copy link
Contributor Author

Waiting on a fix in JS Stellar SDK

@stellar-jenkins
Copy link

@quietbits quietbits changed the title Network selector: accept custom header Network selector: setup for custom headers Nov 4, 2024
@quietbits quietbits marked this pull request as ready for review November 4, 2024 15:15
@stellar-jenkins
Copy link

) => {
if (method === "rpc" && network.rpcHeaderName) {
return { [network.rpcHeaderName]: network.rpcHeaderValue || "" };
} else if (method === "horizon" && network.horizonHeaderName) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is else if better than just using if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just want to future-proof these cases. If we add another method in the future, the else case would also include that, but we probably won't want it.

@stellar-jenkins
Copy link

@quietbits quietbits merged commit 586af2b into master Nov 6, 2024
3 checks passed
@quietbits quietbits deleted the network-selector-header-fields branch November 6, 2024 15:19
@quietbits quietbits restored the network-selector-header-fields branch November 6, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve Lab Network Selector
3 participants