Skip to content

Commit

Permalink
Merge pull request #7563 from filecoin-project/jen/7561
Browse files Browse the repository at this point in the history
fix  the withdrawn amount unit
  • Loading branch information
jennijuju authored Oct 27, 2021
2 parents bcfe7a7 + dc6bd2b commit 8efc805
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
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

0 comments on commit 8efc805

Please sign in to comment.