fix: format fund manager message fil amounts
This commit is contained in:
parent
3287c621ad
commit
e8e4b559e9
@ -502,11 +502,11 @@ func (a *fundedAddress) processWithdrawals(withdrawals []*fundRequest) (msgCid c
|
|||||||
// request with an error
|
// request with an error
|
||||||
newWithdrawalAmt := types.BigAdd(withdrawalAmt, amt)
|
newWithdrawalAmt := types.BigAdd(withdrawalAmt, amt)
|
||||||
if newWithdrawalAmt.GreaterThan(netAvail) {
|
if newWithdrawalAmt.GreaterThan(netAvail) {
|
||||||
msg := fmt.Sprintf("insufficient funds for withdrawal of %d: ", amt)
|
msg := fmt.Sprintf("insufficient funds for withdrawal of %s: ", types.FIL(amt))
|
||||||
msg += fmt.Sprintf("net available (%d) = available (%d) - reserved (%d)",
|
msg += fmt.Sprintf("net available (%s) = available (%s) - reserved (%s)",
|
||||||
types.BigSub(netAvail, withdrawalAmt), avail, a.state.AmtReserved)
|
types.FIL(types.BigSub(netAvail, withdrawalAmt)), types.FIL(avail), types.FIL(a.state.AmtReserved))
|
||||||
if !withdrawalAmt.IsZero() {
|
if !withdrawalAmt.IsZero() {
|
||||||
msg += fmt.Sprintf(" - queued withdrawals (%d)", withdrawalAmt)
|
msg += fmt.Sprintf(" - queued withdrawals (%s)", types.FIL(withdrawalAmt))
|
||||||
}
|
}
|
||||||
err := xerrors.Errorf(msg)
|
err := xerrors.Errorf(msg)
|
||||||
a.debugf("%s", err)
|
a.debugf("%s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user