[#103] owner: remove NEO3Wallet type

Allow to use public keys and N3 wallet accounts instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-01-13 16:16:35 +03:00 committed by Alex Vanin
parent f83ff628fb
commit 596774ce5b
13 changed files with 103 additions and 144 deletions

View file

@ -50,13 +50,7 @@ func (c *Client) CreateSession(ctx context.Context, expiration uint64, opts ...C
opts[i](callOptions)
}
w, err := owner.NEO3WalletFromPublicKey(&callOptions.key.PublicKey)
if err != nil {
return nil, err
}
ownerID := new(owner.ID)
ownerID.SetNeo3Wallet(w)
ownerID := owner.NewIDFromPublicKey(&callOptions.key.PublicKey)
reqBody := new(v2session.CreateRequestBody)
reqBody.SetOwnerID(ownerID.ToV2())
@ -66,7 +60,7 @@ func (c *Client) CreateSession(ctx context.Context, expiration uint64, opts ...C
req.SetBody(reqBody)
req.SetMetaHeader(v2MetaHeaderFromOpts(callOptions))
err = v2signature.SignServiceMessage(callOptions.key, req)
err := v2signature.SignServiceMessage(callOptions.key, req)
if err != nil {
return nil, err
}