From a8c560ae859ce97e23fe3eff04a46f98171eeb72 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 29 Nov 2017 14:24:48 +0100 Subject: [PATCH] Catch of unknown address formats --- Logic/Support/BackendServices/ReturnBitcoinEchoUtxoOrder.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Logic/Support/BackendServices/ReturnBitcoinEchoUtxoOrder.cs b/Logic/Support/BackendServices/ReturnBitcoinEchoUtxoOrder.cs index b338b0c8..7e3c430b 100644 --- a/Logic/Support/BackendServices/ReturnBitcoinEchoUtxoOrder.cs +++ b/Logic/Support/BackendServices/ReturnBitcoinEchoUtxoOrder.cs @@ -59,6 +59,10 @@ namespace Swarmops.Logic.Support.BackendServices txBuilder = txBuilder.Send(new BitcoinScriptAddress(returnAddress, Network.Main), new Satoshis(utxoToReturn.AmountSatoshis - BitcoinUtility.EchoFeeSatoshis)); } + else + { + throw new ArgumentException("Unrecognized address format"); + } Transaction tx = txBuilder.BuildTransaction(true, SigHash.ForkId | SigHash.All);