Use FundManager to withdraw funds, add MarketWithdraw to API

This commit is contained in:
Ingar Shu
2020-12-03 13:08:18 -08:00
parent b13226bc2f
commit 13c8a235b6
4 changed files with 17 additions and 22 deletions
+6 -1
View File
@@ -5,10 +5,11 @@ import (
"go.uber.org/fx"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid"
)
type MarketAPI struct {
@@ -24,3 +25,7 @@ func (a *MarketAPI) MarketReserveFunds(ctx context.Context, wallet address.Addre
func (a *MarketAPI) MarketReleaseFunds(ctx context.Context, addr address.Address, amt types.BigInt) error {
return a.FMgr.Release(addr, amt)
}
func (a *MarketAPI) MarketWithdraw(ctx context.Context, wallet, addr address.Address, amt types.BigInt) (cid.Cid, error) {
return a.FMgr.Withdraw(ctx, wallet, addr, amt)
}