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

bin: fix config api-key alias #833

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

rithvikvibhu
Copy link
Member

@rithvikvibhu rithvikvibhu commented Aug 2, 2023

problem:

# start node
❯ hsd --memory --network regtest --api-key apikey

# use short arg name
❯ hsd-cli -k apikey info
Error: Unauthorized (bad API key).
    at NodeClient.request (/media/data/Projects/handshake/hsd/node_modules/bcurl/lib/client.js:221:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async CLI.getInfo (/media/data/Projects/handshake/hsd/bin/hsd-cli:82:18)
    at async CLI.open (/media/data/Projects/handshake/hsd/bin/hsd-cli:233:9)
    at async /media/data/Projects/handshake/hsd/bin/hsd-cli:262:3

moved from hs-client repo:

@coveralls
Copy link

coveralls commented Aug 2, 2023

Coverage Status

coverage: 68.637%. remained the same when pulling df7505c on rithvikvibhu:fix-config-alias into 2fab14e on handshake-org:master.

@nodech
Copy link
Contributor

nodech commented Aug 4, 2023

This change and the example in the comment are two different things, no?

The fullnode, spvnode and walletnode do not have http-port alias, only hsd-cli/hsw-cli have this alias and is broken. Example using hsd seems misleading to that.

Maybe example with ./bin/hsd-cli/rpc and/or ./bin/hsw-cli/rpc would be more appropriate ?

@nodech
Copy link
Contributor

nodech commented Aug 4, 2023

I think p and h work fine with all hs-client cli tools. What seems broken to me is api-key, k not being properly translated into the alias with those tools

@rithvikvibhu rithvikvibhu changed the title bin: fix config aliases for http-{host,port} bin: fix config api-key alias Aug 4, 2023
@rithvikvibhu
Copy link
Member Author

You're right, port and host worked fine, api key didn't. Updated

@nodech nodech merged commit 5210af2 into handshake-org:master Aug 5, 2023
5 checks passed
@rithvikvibhu rithvikvibhu deleted the fix-config-alias branch August 5, 2023 09:55
This was referenced Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants