I had this working before (like 3 days ago) but now I am having issues with sending money to an account. I keep getting this error string
"Error transferring https://horizon-testnet.stellar.org/transactions - server replied: Bad Request"
but nothing in my code is different. Bellow is my SendMoney function.
Network::useTestNetwork();
Server* server = new Server("https://horizon-testnet.stellar.org");
AccountResponse* sourceAccount = server->accounts().account(source);
QObject::connect(sourceAccount, &AccountResponse::ready, [sourceAccount, source, dest, server]()
{
qint64 sequenceNumber = sourceAccount->getSequenceNumber();
Account* account = new Account(source, sequenceNumber);
// Start building the transaction.
Transaction::Builder *builder = new Transaction::Builder(account);
builder->addOperation(new PaymentOperation(dest, new AssetTypeNative(), "10"));
builder->addMemo(Memo::text("Test"));
Transaction * mTrans = builder->build();
// Sign the transaction to prove you are actually the person sending it.
mTrans->sign(source);
server->submitTransaction(mTrans);
});
Thanks guys any help os appreciated.