MCPcopy Create free account
hub / github.com/ElementsProject/elements / addNewRequest

Method addNewRequest

src/qt/recentrequeststablemodel.cpp:172–186  ·  view source on GitHub ↗

called when adding a request from the GUI

Source from the content-addressed store, hash-verified

170
171// called when adding a request from the GUI
172void 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
189void RecentRequestsTableModel::addNewRequest(const std::string &recipient)

Callers 1

Calls 8

DecodeDestinationFunction · 0.85
strMethod · 0.80
QModelIndexClass · 0.70
ToStringFunction · 0.50
walletMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected