[#1743] morph: Fix non-notary calls

Some methods add "IR" suffix to its names in notary enabled envs
because of contract logic. It was broken due to incorrect notary state
reading (tryNotary != notary is enabled).

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-08-31 14:09:55 +03:00 committed by fyrchik
parent e6cf0b3d42
commit 17059b34ea
3 changed files with 8 additions and 1 deletions

View file

@ -116,6 +116,12 @@ func (c *Client) EnableNotarySupport(opts ...NotaryOption) error {
return nil
}
// IsNotaryEnabled returns true if EnableNotarySupport has been successfully
// called before.
func (c *Client) IsNotaryEnabled() bool {
return c.notary != nil
}
// ProbeNotary checks if native `Notary` contract is presented on chain.
func (c *Client) ProbeNotary() (res bool) {
c.switchLock.RLock()