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

Better CLI for wallet market withdraw and client info #5303

Merged
merged 1 commit into from
Jan 8, 2021

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Jan 7, 2021

Depends on #5300

  1. Take into account reserved funds when checking if a withdrawal can go through
    FundManager already takes reserved funds into account. This just allows us to provide a nicer error message.
$ ./lotus wallet market withdraw 0.1
ERROR: can't withdraw more funds than available; requested: 0.1 FIL; available (0.028390768721594256 FIL) = escrow (0.030402437533428 FIL) - locked (0.001609365784995864 FIL) - reserved (0.00040230302683788 FIL)
  1. Change wallet market withdraw parameter name
    It was --from, which was confusing. Change it to --wallet.
$ ./lotus wallet market withdraw --help
NAME:
   lotus wallet market withdraw - Withdraw funds from the Storage Market Actor

USAGE:
   lotus wallet market withdraw [command options] [amount (FIL) optional, otherwise will withdraw max available]

OPTIONS:
   --wallet value, -w value   Specify address to withdraw funds to, otherwise it will use the default wallet address
   --address value, -a value  Market address to withdraw from (account or miner actor address, defaults to --wallet address)
   --help, -h                 show help (default: false)```
  1. Include reserved and available amounts in client info:
Client Market Balance for address t3q6lax2ki2af5tixlv6mx3gfggykjmitozj5n4y5azyebtpgbgwftl6eh6r3z4dwv6kba3huhhuloogmzrkoq:
  Escrowed Funds:        0.030402437533428 FIL
  Locked Funds:          0.001609365784995864 FIL
  Reserved Funds:        0.00040230302683788 FIL
  Available to Withdraw: 0.028390768721594256 FIL

Base automatically changed from feat/wallet-market-add to master January 8, 2021 20:31
@magik6k magik6k merged commit 32dcfb4 into master Jan 8, 2021
@magik6k magik6k deleted the feat/wallet-market-info branch January 8, 2021 21:54
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.

None yet

2 participants