public string PrepareNewTransaction(string aToAddress, ulong aAmount, uint aCurrencyID, ulong aTxFee = 0) { CurrencyTransaction lCurrencyTransaction; if (!FWalletPandoraServer.VerifyAddress(aCurrencyID, aToAddress)) { throw new ClientExceptions.InvalidAddressException("Address provided not valid. Please verify"); } ulong lBalance = FBalance[aCurrencyID].Total; ulong lTxFee = (aTxFee == 0) ? CalculateTxFee(aToAddress, aAmount, aCurrencyID) : aTxFee; if (lBalance < (aAmount + lTxFee)) { throw new ClientExceptions.InsufficientFundsException("The amount plus TxFee is higher than the balance"); } lCurrencyTransaction = CreateNewCurrencyTransaction(aCurrencyID, aAmount, aToAddress, lTxFee); if (lCurrencyTransaction.TxFee == 0) { throw new ClientExceptions.InvalidOperationException("You can't send a transaction with no fee"); } string TxData = FWalletPandoraServer.CreateTransaction(aCurrencyID, lCurrencyTransaction); SetCoinAccountData(aCurrencyID); string lSignedTx; lock (FCurrencyAdvocacies) lSignedTx = FCurrencyAdvocacies[aCurrencyID].SignTransaction(TxData, lCurrencyTransaction); return(lSignedTx); }