mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
throw error if destination amount or address not defined on create_txs()
This commit is contained in:
@@ -383,12 +383,12 @@ namespace monero {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blockchain's height by date.
|
||||
* Get the blockchain's height by date as a conservative estimate for scanning.
|
||||
*
|
||||
* @param year - year of the height to get
|
||||
* @param month - month of the height to get as a number between 1 and 12
|
||||
* @param day - day of the height to get as a number between 1 and 31
|
||||
* @return the blockchain's height at the given date
|
||||
* @return the blockchain's approximate height at the given date
|
||||
*/
|
||||
virtual uint64_t get_height_by_date(uint16_t year, uint8_t month, uint8_t day) const {
|
||||
throw std::runtime_error("get_height_by_date(year, month, day) not supported");
|
||||
|
||||
@@ -1698,6 +1698,8 @@ namespace monero {
|
||||
std::list<tools::wallet_rpc::transfer_destination> tr_destinations;
|
||||
for (const std::shared_ptr<monero_destination>& destination : config.get_normalized_destinations()) {
|
||||
tools::wallet_rpc::transfer_destination tr_destination;
|
||||
if (destination->m_amount == boost::none) throw std::runtime_error("Destination amount not defined");
|
||||
if (destination->m_address == boost::none) throw std::runtime_error("Destination address not defined");
|
||||
tr_destination.amount = destination->m_amount.get();
|
||||
tr_destination.address = destination->m_address.get();
|
||||
tr_destinations.push_back(tr_destination);
|
||||
|
||||
Reference in New Issue
Block a user