From f2a82aa635aa57d9b05092d8cf15b170b53cc324 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Fri, 12 Jan 2024 16:17:31 +0300 Subject: [PATCH] [#69] frostfsid: Add new client init function Signed-off-by: Denis Kirillov --- frostfsid/client/client.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frostfsid/client/client.go b/frostfsid/client/client.go index 9573220..ef08267 100644 --- a/frostfsid/client/client.go +++ b/frostfsid/client/client.go @@ -22,7 +22,6 @@ import ( type ( Client struct { act *actor.Actor - acc *wallet.Account contract util.Uint160 } @@ -153,11 +152,18 @@ func New(ra actor.RPCActor, acc *wallet.Account, contract util.Uint160, opt Opti return &Client{ act: act, - acc: acc, contract: contract, }, nil } +// NewSimple creates a new Client using exising actor.Actor. +func NewSimple(act *actor.Actor, contract util.Uint160) *Client { + return &Client{ + act: act, + contract: contract, + } +} + // StartTx inits transaction. func (c Client) StartTx() *commonclient.Transaction { return commonclient.NewTransaction(c.contract)