From 7c559aaeaab2cb9a07b9a5cc0cc667c336428e6c Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 29 Apr 2021 16:31:59 +0300 Subject: [PATCH] [#486] morph/client: Add notary enabled check function Signed-off-by: Alex Vanin --- pkg/morph/client/notary.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/morph/client/notary.go b/pkg/morph/client/notary.go index cbc290f7..2d03fe43 100644 --- a/pkg/morph/client/notary.go +++ b/pkg/morph/client/notary.go @@ -89,6 +89,12 @@ func (c *Client) EnableNotarySupport(proxy util.Uint160, opts ...NotaryOption) e return nil } +// NotaryEnabled returns true if notary support was enabled in this instance +// of client by calling `EnableNotarySupport()`. Otherwise returns false. +func (c *Client) NotaryEnabled() bool { + return c.notary != nil +} + // DepositNotary calls notary deposit method. Deposit is required to operate // with notary contract. It used by notary contract in to produce fallback tx // if main tx failed to create. Deposit isn't last forever, so it should