-
Notifications
You must be signed in to change notification settings - Fork 213
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
Review CLI interface & implement --version #232
Conversation
exe/wallet/Main.hs
Outdated
cardano-wallet wallet list [--port=INT] | ||
cardano-wallet wallet get [--port=INT] --wallet-id=STRING | ||
cardano-wallet wallet create [--port=INT] --name=STRING [--address-pool-gap=INT] | ||
cardano-wallet wallet delete [--port=INT] --id=STRING |
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.
--wallet-id=STRING
?
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.
Yes? 😅 ?
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.
Yes... or cardano-wallet wallet get [--port=INT] --id=STRING
:)
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.
Ah! That's what you meant 😄 ... I've just made this a positional argument actually (as discussed in the ticket), so I'll push on top of this commit.
@@ -182,6 +192,18 @@ exec manager args | |||
wId <- args `parseArg` longOption "id" | |||
runClient $ void $ deleteWallet (ApiT wId) | |||
|
|||
| args `isPresent` longOption "version" = do | |||
let cabal = B8.unpack $(embedFile "cardano-wallet.cabal") |
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.
we're not shipping cardano-wallet.cabal
, so it wouldn't work, would it? :/
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.
It does, the file is embedded at compile-time. This won't even compile without the file.
e1776f7
to
af0a8cb
Compare
port <- args `parseArg` longOption "port" | ||
let env = mkClientEnv manager (BaseUrl Http "localhost" port "") | ||
res <- runClientM cmd env | ||
case res of | ||
Left (FailureResponse r) | responseStatusCode r == status404 -> do | ||
let typ = T.pack $ tyConName $ typeRepTyCon $ typeRep $ Proxy @b |
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.
👍
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've added a similar one for status409 :: Conflict
for already existing resources.
3c3b4df
to
93e6a65
Compare
Issue Number
#229
Overview
--version
using the version from thecardano-wallet.cabal
[--port]
option to the delete wallet command404
and409
errorswalletId
a positional argument (rather than being a option)PUT /v2/wallets/{walletId}
command in the CLI definitionDELETE /v2/wallets/{walletId}
to display nothing but a confirmation or error message (was displaying an empty array before)Comments