From a7f6a3df783d3e9bb036043db9a8a0102f8543c7 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 8 Sep 2021 18:18:09 +0300 Subject: [PATCH] [#812] morph/client: Add underline client getter in reputation wrapper Signed-off-by: Alex Vanin --- pkg/morph/client/reputation/client.go | 5 +++++ pkg/morph/client/reputation/wrapper/wrapper.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/pkg/morph/client/reputation/client.go b/pkg/morph/client/reputation/client.go index 34b5290cd..395fcc06e 100644 --- a/pkg/morph/client/reputation/client.go +++ b/pkg/morph/client/reputation/client.go @@ -71,6 +71,11 @@ func New(c *client.StaticClient, opts ...Option) (*Client, error) { return res, nil } +// Morph returns raw morph client. +func (c Client) Morph() *client.Client { + return c.client.Morph() +} + // WithPutMethod returns a client constructor option that // specifies the method name to put reputation value. // diff --git a/pkg/morph/client/reputation/wrapper/wrapper.go b/pkg/morph/client/reputation/wrapper/wrapper.go index 9bcbb6181..e7ded7f2b 100644 --- a/pkg/morph/client/reputation/wrapper/wrapper.go +++ b/pkg/morph/client/reputation/wrapper/wrapper.go @@ -23,6 +23,11 @@ func defaultOpts() *opts { return new(opts) } +// Morph returns raw morph client. +func (w ClientWrapper) Morph() *client.Client { + return (reputation.Client)(w).Morph() +} + // TryNotary returns option to enable // notary invocation tries. func TryNotary() Option {