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