Skip to content

Commit

Permalink
Merge branch 'master' into rebuild/leveldbstore-1
Browse files Browse the repository at this point in the history
  • Loading branch information
cschuchardt88 committed Aug 26, 2024
2 parents 19a8fd3 + dc926f7 commit 8f4c39c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Neo/Wallets/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public static long CalculateNetworkFee(this Transaction tx, DataCache snapshot,
{
var contract = NativeContract.ContractManagement.GetContract(snapshot, hash);
if (contract is null)
throw new ArgumentException($"The smart contract or address {hash} is not found");
throw new ArgumentException($"The smart contract or address {hash} ({hash.ToAddress(settings.AddressVersion)}) is not found. " +
$"If this is your wallet address and you want to sign a transaction with it, make sure you have opened this wallet.");
var md = contract.Manifest.Abi.GetMethod(ContractBasicMethod.Verify, ContractBasicMethod.VerifyPCount);
if (md is null)
throw new ArgumentException($"The smart contract {contract.Hash} haven't got verify method");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public void TestInvokeFunction()
Assert.AreEqual(resp["diagnostics"]["invokedcontracts"]["call"][0]["hash"], NeoToken.NEO.Hash.ToString());
Assert.IsTrue(((JArray)resp["diagnostics"]["storagechanges"]).Count == 4);
Assert.AreEqual(resp["state"], nameof(VM.VMState.HALT));
Assert.AreEqual(resp["exception"], $"The smart contract or address {MultisigScriptHash.ToString()} is not found");
Assert.AreEqual(resp["exception"], $"The smart contract or address {MultisigScriptHash} ({MultisigAddress}) is not found. " +
$"If this is your wallet address and you want to sign a transaction with it, make sure you have opened this wallet.");
JArray notifications = (JArray)resp["notifications"];
Assert.AreEqual(notifications.Count, 2);
Assert.AreEqual(notifications[0]["eventname"].AsString(), "Transfer");
Expand Down

0 comments on commit 8f4c39c

Please sign in to comment.