Convert ID addresses to key addresses before checking wallet

This commit is contained in:
Aayush Rajasekaran 2020-10-01 04:30:34 -04:00
parent 60d442e36a
commit 6f0453c581

View File

@ -117,7 +117,13 @@ func (a *API) ClientStartDeal(ctx context.Context, params *api.StartDealParams)
} }
} }
} }
exist, err := a.WalletHas(ctx, params.Wallet)
walletKey, err := a.StateAPI.StateManager.ResolveToKeyAddress(ctx, params.Wallet, nil)
if err != nil {
return nil, xerrors.Errorf("failed resolving params.Wallet addr: %w", params.Wallet)
}
exist, err := a.WalletHas(ctx, walletKey)
if err != nil { if err != nil {
return nil, xerrors.Errorf("failed getting addr from wallet: %w", params.Wallet) return nil, xerrors.Errorf("failed getting addr from wallet: %w", params.Wallet)
} }