コード例 #1
0
 public DepositDetailsForRpc(DepositDetails deposit, uint timestamp)
 {
     Id           = deposit.Id;
     Deposit      = new DepositForRpc(deposit.Deposit);
     DataAsset    = new DataAssetForRpc(deposit.DataAsset);
     Consumer     = deposit.Consumer;
     Timestamp    = deposit.Timestamp;
     Transaction  = deposit.Transaction is null ? null : new TransactionInfoForRpc(deposit.Transaction);
     Transactions = deposit.Transactions?.Select(t => new TransactionInfoForRpc(t)).OrderBy(t => t.Timestamp) ??
                    Enumerable.Empty <TransactionInfoForRpc>();
     ConfirmationTimestamp = deposit.ConfirmationTimestamp;
     Confirmed             = deposit.Confirmed;
     Rejected                 = deposit.Rejected;
     Cancelled                = deposit.Cancelled;
     Expired                  = deposit.IsExpired(timestamp);
     RefundClaimed            = deposit.RefundClaimed;
     ClaimedRefundTransaction = deposit.ClaimedRefundTransaction is null
         ? null
         : new TransactionInfoForRpc(deposit.ClaimedRefundTransaction);
     ClaimedRefundTransactions = deposit.ClaimedRefundTransactions?.Select(t => new TransactionInfoForRpc(t))
                                 .OrderBy(t => t.Timestamp) ??
                                 Enumerable.Empty <TransactionInfoForRpc>();
     RefundCancelled       = deposit.RefundCancelled;
     ConsumedUnits         = deposit.ConsumedUnits;
     Kyc                   = deposit.Kyc;
     Confirmations         = deposit.Confirmations;
     RequiredConfirmations = deposit.RequiredConfirmations;
 }
コード例 #2
0
 public DepositDetailsForRpc(DepositDetails deposit, uint timestamp)
 {
     Id                           = deposit.Id;
     Deposit                      = new DepositForRpc(deposit.Deposit);
     DataAsset                    = new DataAssetForRpc(deposit.DataAsset);
     Consumer                     = deposit.Consumer;
     Timestamp                    = deposit.Timestamp;
     TransactionHash              = deposit.TransactionHash;
     ConfirmationTimestamp        = deposit.ConfirmationTimestamp;
     Confirmed                    = deposit.Confirmed;
     Rejected                     = deposit.Rejected;
     Expired                      = deposit.IsExpired(timestamp);
     RefundClaimed                = deposit.RefundClaimed;
     ClaimedRefundTransactionHash = deposit.ClaimedRefundTransactionHash;
     ConsumedUnits                = deposit.ConsumedUnits;
     Kyc                          = deposit.Kyc;
     Confirmations                = deposit.Confirmations;
     RequiredConfirmations        = deposit.RequiredConfirmations;
 }
コード例 #3
0
        public void when_is_expired_returns_true()
        {
            var isExpired = _depositDetails.IsExpired(30);

            Assert.IsTrue(isExpired);
        }