コード例 #1
0
        public void UnlockWallet(bool unlock, int time = 100)
        {
            string password;

            if (unlock)
            {
                var config = _configManager.GetConfig <VaultConfig>("vault") ??
                             throw new Exception("No 'vault' section in config file");
                password = config.Password !;
                Assert.AreEqual(true, _privateWallet.Unlock(password, time));
            }
            else
            {
                password = "******";  // random password
                Assert.AreEqual(false, _privateWallet.Unlock(password, time));
            }
        }
コード例 #2
0
ファイル: FrontEndService.cs プロジェクト: LAToken/lachain
 public string UnlockWallet(string password, long s)
 {
     return(_privateWallet.Unlock(password, s) ? "unlocked" : "incorrect_password");
 }