Ejemplo n.º 1
0
        public void returns_time_left_to_claim_refund_correctly()
        {
            _depositDetails.SetConfirmationTimestamp(5);

            UInt256 timeLeft = _depositDetails.GetTimeLeftToClaimRefund(8);

            Assert.IsTrue(timeLeft == 12);
        }
Ejemplo n.º 2
0
        private void DisplayRefundInfo(DepositDetails deposit, ulong now)
        {
            var timeLeftToClaimRefund = deposit.GetTimeLeftToClaimRefund(now);

            if (timeLeftToClaimRefund > 0)
            {
                if (_logger.IsInfo)
                {
                    _logger.Info($"Time left to claim a refund: {timeLeftToClaimRefund} seconds.");
                }
            }
            else
            {
                if (_logger.IsInfo)
                {
                    _logger.Info("Deposit is not claimable.");
                }
            }
        }