Ejemplo n.º 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()
            };

            this.fileStorage.SaveToFile(watchOnlyWallet, WalletFileName);
            return(watchOnlyWallet);
        }