public async Task try_confirm_should_not_confirm_deposit_if_transaction_was_not_found() { var deposit = GetDepositDetails(); await _depositConfirmationService.TryConfirmAsync(deposit); await _blockchainBridge.Received().GetTransactionAsync(deposit.TransactionHash); await _blockchainBridge.DidNotReceive().GetLatestBlockNumberAsync(); deposit.Confirmed.Should().BeFalse(); }
public async Task verify_async_should_return_result_with_confirmed_property_equal_to_false_if_latest_block_is_null() { var transaction = GetTransaction(); var result = await _transactionVerifier.VerifyAsync(transaction); result.BlockFound.Should().BeFalse(); result.Confirmed.Should().BeFalse(); await _blockchainBridge.Received().GetLatestBlockAsync(); }
public void update_gas_price_should_fail_if_transaction_was_not_found() { var transactionHash = TestItem.KeccakA; Func <Task> act = () => _transactionService.UpdateGasPriceAsync(transactionHash, 1); act.Should().Throw <ArgumentException>() .WithMessage($"Transaction was not found for hash: '{transactionHash}'. (Parameter 'transactionHash')"); _blockchainBridge.Received().GetTransactionAsync(transactionHash); }