called when adding a request from the GUI
| 171 | |
| 172 | // called when adding a request from the GUI |
| 173 | void RecentRequestsTableModel::addNewRequest(const SendCoinsRecipient &recipient) |
| 174 | { |
| 175 | RecentRequestEntry newEntry; |
| 176 | newEntry.id = ++nReceiveRequestsMaxId; |
| 177 | newEntry.date = QDateTime::currentDateTime(); |
| 178 | newEntry.recipient = recipient; |
| 179 | |
| 180 | DataStream ss{}; |
| 181 | ss << newEntry; |
| 182 | |
| 183 | if (!walletModel->wallet().setAddressReceiveRequest(DecodeDestination(recipient.address.toStdString()), ToString(newEntry.id), ss.str())) |
| 184 | return; |
| 185 | |
| 186 | addNewRequest(newEntry); |
| 187 | } |
| 188 | |
| 189 | // called from ctor when loading from wallet |
| 190 | void RecentRequestsTableModel::addNewRequest(const std::string &recipient) |
no test coverage detected