I came across an Exception when testing CreateAccount(UInt160 scriptHash) in Neo.Wallets.SQLite.UserWallet.
CreateAccount(UInt160 scriptHash) will call AddAccount(UserWalletAccount account, bool is_import) method but line126 Address db_address = ctx.Addresses.FirstOrDefault(p => p.ScriptHash == account.Contract.ScriptHash.ToArray()); in Neo.Wallets.SQLite.UserWallet will throw a NullReferenceException because account.Contract is null.
I think we need to add a nullable check before line126 .

Could you share with me this Unit test file?
Please take a look at TestCreateAccountByScriptHash method in this file UT_UserWallet.cs
Take a look at this pr:
Nick work @shargon ! Now I can close this.
Most helpful comment
Take a look at this pr:
https://github.com/eryeer/neoUT/pull/10