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

fix the withdrawn amount unit #7563

Merged
merged 3 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions cli/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,9 @@ var walletMarketWithdraw = &cli.Command{
return err
}

fmt.Printf("Successfully withdrew %s FIL\n", withdrawn)
fmt.Printf("Successfully withdrew %s \n", types.FIL(withdrawn))
if withdrawn.LessThan(amt) {
fmt.Printf("Note that this is less than the requested amount of %s FIL\n", amt)
fmt.Printf("Note that this is less than the requested amount of %s \n", types.FIL(amt))
}
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/lotus-miner/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var actorWithdrawCmd = &cli.Command{
amount = abi.TokenAmount(f)

if amount.GreaterThan(available) {
return xerrors.Errorf("can't withdraw more funds than available; requested: %s; available: %s", amount, available)
return xerrors.Errorf("can't withdraw more funds than available; requested: %s; available: %s", types.FIL(amount), types.FIL(available))
}
}

Expand Down Expand Up @@ -306,9 +306,9 @@ var actorWithdrawCmd = &cli.Command{
return err
}

fmt.Printf("Successfully withdrew %s FIL\n", withdrawn)
fmt.Printf("Successfully withdrew %s \n", types.FIL(withdrawn))
if withdrawn.LessThan(amount) {
fmt.Printf("Note that this is less than the requested amount of %s FIL\n", amount)
fmt.Printf("Note that this is less than the requested amount of %s\n", types.FIL(amount))
}
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/lotus-shed/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ var actorWithdrawCmd = &cli.Command{
amount = abi.TokenAmount(f)

if amount.GreaterThan(available) {
return xerrors.Errorf("can't withdraw more funds than available; requested: %s; available: %s", amount, available)
return xerrors.Errorf("can't withdraw more funds than available; requested: %s; available: %s", types.FIL(amount), types.FIL(available))
}
}

Expand Down Expand Up @@ -151,9 +151,9 @@ var actorWithdrawCmd = &cli.Command{
return err
}

fmt.Printf("Successfully withdrew %s FIL\n", withdrawn)
fmt.Printf("Successfully withdrew %s \n", types.FIL(withdrawn))
if withdrawn.LessThan(amount) {
fmt.Printf("Note that this is less than the requested amount of %s FIL\n", amount)
fmt.Printf("Note that this is less than the requested amount of %s \n", types.FIL(amount))
}
}

Expand Down