Beispiel #1
0
        public async Task cancel_refund_should_return_transaction_hash()
        {
            var depositId = TestItem.KeccakA;
            var info      = new UpdatedTransactionInfo(UpdatedTransactionStatus.Ok, TestItem.KeccakB);

            _consumerTransactionsService.CancelRefundAsync(depositId).Returns(info);
            var result = await _rpc.ndm_cancelRefund(depositId);

            result.Data.Status.Should().Be(info.Status.ToString().ToLowerInvariant());
            result.Data.Hash.Should().Be(info.Hash);
            await _consumerTransactionsService.Received().CancelRefundAsync(depositId);
        }
Beispiel #2
0
        public async Task update_refund_gas_price_should_return_transaction_hash()
        {
            var depositId = TestItem.KeccakA;
            var gasPrice  = 20.GWei();
            var info      = new UpdatedTransactionInfo(UpdatedTransactionStatus.Ok, TestItem.KeccakB);

            _consumerTransactionsService.UpdateRefundGasPriceAsync(depositId, gasPrice).Returns(info);
            var result = await _rpc.ndm_updateRefundGasPrice(depositId, gasPrice);

            result.Data.Status.Should().Be(info.Status.ToString().ToLowerInvariant());
            result.Data.Hash.Should().Be(info.Hash);
            await _consumerTransactionsService.Received().UpdateRefundGasPriceAsync(depositId, gasPrice);
        }
 public UpdatedTransactionInfoForRpc(UpdatedTransactionInfo info)
     : this(info.Status.ToString().ToLowerInvariant(), info.Hash)
 {
 }