Changeset View
Changeset View
Standalone View
Standalone View
src/qt/addresstablemodel.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | bool operator()(const QString &a, const AddressTableEntry &b) const { | ||||
return a < b.address; | return a < b.address; | ||||
} | } | ||||
}; | }; | ||||
/* Determine address type from address purpose */ | /* Determine address type from address purpose */ | ||||
static AddressTableEntry::Type | static AddressTableEntry::Type | ||||
translateTransactionType(const QString &strPurpose, bool isMine) { | translateTransactionType(const QString &strPurpose, bool isMine) { | ||||
AddressTableEntry::Type addressType = AddressTableEntry::Hidden; | AddressTableEntry::Type addressType = AddressTableEntry::Hidden; | ||||
// "refund" addresses aren't shown, and change addresses aren't in | // "refund" addresses aren't shown, and change addresses aren't returned by | ||||
// mapAddressBook at all. | // getAddresses at all. | ||||
if (strPurpose == "send") { | if (strPurpose == "send") { | ||||
addressType = AddressTableEntry::Sending; | addressType = AddressTableEntry::Sending; | ||||
} else if (strPurpose == "receive") { | } else if (strPurpose == "receive") { | ||||
addressType = AddressTableEntry::Receiving; | addressType = AddressTableEntry::Receiving; | ||||
} else if (strPurpose == "unknown" || strPurpose == "") { | } else if (strPurpose == "unknown" || strPurpose == "") { | ||||
// if purpose not set, guess | // if purpose not set, guess | ||||
addressType = (isMine ? AddressTableEntry::Receiving | addressType = (isMine ? AddressTableEntry::Receiving | ||||
: AddressTableEntry::Sending); | : AddressTableEntry::Sending); | ||||
▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines |