Catch of unknown address formats

This commit is contained in:
Rick Falkvinge
2017-11-29 14:24:48 +01:00
parent ab789090ee
commit a8c560ae85
@@ -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);