[#1100] *: Adopt new SDK's owner.ID API

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-01-21 15:15:10 +03:00 committed by Alex Vanin
parent 4b5404047c
commit fee2f5a330
21 changed files with 32 additions and 134 deletions

View file

@ -122,14 +122,7 @@ func (v *FormatValidator) checkOwnerKey(id *owner.ID, key []byte) error {
return err
}
wallet, err := owner.NEO3WalletFromPublicKey((*ecdsa.PublicKey)(pub))
if err != nil {
// TODO: check via NeoFSID
return err
}
id2 := owner.NewID()
id2.SetNeo3Wallet(wallet)
id2 := owner.NewIDFromPublicKey((*ecdsa.PublicKey)(pub))
if !id.Equal(id2) {
return fmt.Errorf("(%T) different owner identifiers %s/%s", v, id, id2)