From 47e8b52e34123d0f74fa994ce8d615b66e96f79e Mon Sep 17 00:00:00 2001 From: erikzhang Date: Mon, 3 Aug 2020 17:14:11 +0800 Subject: [PATCH] Update Wallet.cs --- src/neo/Wallets/Wallet.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/neo/Wallets/Wallet.cs b/src/neo/Wallets/Wallet.cs index e353ef85da..b465f396f7 100644 --- a/src/neo/Wallets/Wallet.cs +++ b/src/neo/Wallets/Wallet.cs @@ -448,6 +448,7 @@ public bool Sign(ContractParametersContext context) if (fSuccess) m--; if (context.Completed || m <= 0) break; } + continue; } else if (account.HasKey) { @@ -455,25 +456,24 @@ public bool Sign(ContractParametersContext context) KeyPair key = account.GetKey(); byte[] signature = context.Verifiable.Sign(key); fSuccess |= context.AddSignature(account.Contract, key.PublicKey, signature); + continue; } } - else - { - // Try Smart contract verification - using var snapshot = Blockchain.Singleton.GetSnapshot(); - var contract = snapshot.Contracts.TryGet(scriptHash); + // Try Smart contract verification - if (contract != null) - { - var deployed = new DeployedContract(contract); + using var snapshot = Blockchain.Singleton.GetSnapshot(); + var contract = snapshot.Contracts.TryGet(scriptHash); - // Only works with verify without parameters + if (contract != null) + { + var deployed = new DeployedContract(contract); - if (deployed.ParameterList.Length == 0) - { - fSuccess |= context.Add(deployed); - } + // Only works with verify without parameters + + if (deployed.ParameterList.Length == 0) + { + fSuccess |= context.Add(deployed); } } }