Merge pull request #4122 from filecoin-project/asr/client-wallet

Convert ID addresses to key addresses before checking wallet
This commit is contained in:
Łukasz Magiera 2020-10-04 17:20:04 +02:00 committed by GitHub
commit 97087fe576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {
return nil, xerrors.Errorf("failed getting addr from wallet: %w", params.Wallet)
}