From 6f0453c581205988db108c01f30d5b431662edca Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Thu, 1 Oct 2020 04:30:34 -0400 Subject: [PATCH] Convert ID addresses to key addresses before checking wallet --- node/impl/client/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/node/impl/client/client.go b/node/impl/client/client.go index 7cb087ec7b3..e7cfd0277f1 100644 --- a/node/impl/client/client.go +++ b/node/impl/client/client.go @@ -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 { return nil, xerrors.Errorf("failed getting addr from wallet: %w", params.Wallet) }