Beispiel #1
0
        /// <inheritdoc />
        public WatchOnlyWallet LoadWatchOnlyWallet()
        {
            if (this.fileStorage.Exists(WalletFileName))
            {
                return(this.fileStorage.LoadByFileName(WalletFileName));
            }

            WatchOnlyWallet watchOnlyWallet = new WatchOnlyWallet
            {
                Network          = this.network,
                CoinType         = this.coinType,
                CreationTime     = this.dateTimeProvider.GetTimeOffset(),
                WatchedAddresses = new ConcurrentDictionary <string, WatchedAddress>()
            };

            this.fileStorage.SaveToFile(watchOnlyWallet, WalletFileName);
            return(watchOnlyWallet);
        }
Beispiel #2
0
 /// <inheritdoc />
 public void Initialize()
 {
     // load the watch only wallet into memory
     this.Wallet = this.LoadWatchOnlyWallet();
 }