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

initial wallet support for boost #422

Merged
merged 8 commits into from
Apr 8, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove market flag
nonsense committed Apr 8, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 5adc40818574d3bdec09f0fc4b0a02972e2e686f
15 changes: 4 additions & 11 deletions cmd/boost/wallet_cmd.go
Original file line number Diff line number Diff line change
@@ -89,11 +89,6 @@ var walletList = &cli.Command{
Usage: "Output ID addresses",
Aliases: []string{"i"},
},
&cli.BoolFlag{
Name: "market",
Usage: "Output market balances",
Aliases: []string{"m"},
},
},
Action: func(cctx *cli.Context) error {
ctx := lcli.ReqContext(cctx)
@@ -171,12 +166,10 @@ var walletList = &cli.Command{
}
}

if cctx.Bool("market") {
mbal, err := api.StateMarketBalance(ctx, addr, types.EmptyTSK)
if err == nil {
row["Market(Avail)"] = types.FIL(types.BigSub(mbal.Escrow, mbal.Locked))
row["Market(Locked)"] = types.FIL(mbal.Locked)
}
mbal, err := api.StateMarketBalance(ctx, addr, types.EmptyTSK)
if err == nil {
row["Market(Avail)"] = types.FIL(types.BigSub(mbal.Escrow, mbal.Locked))
row["Market(Locked)"] = types.FIL(mbal.Locked)
}

tw.Write(row)