use first 4 chars of account_id_hex as account nr to avoid accounts shuffling

This commit is contained in:
Sergio Chouhy 2026-06-05 02:27:10 -03:00
parent edf27b82aa
commit d4a8988098

View File

@ -43,10 +43,8 @@ void LEZWalletAccountModel::replaceFromJsonArray(const QJsonArray& arr)
beginResetModel();
int oldCount = m_entries.size();
m_entries.clear();
int idx = 0;
for (const QJsonValue& v : arr) {
LEZWalletAccountEntry e;
e.name = QStringLiteral("Account %1").arg(++idx);
e.balance = QString();
if (v.isObject()) {
const QJsonObject obj = v.toObject();
@ -56,6 +54,7 @@ void LEZWalletAccountModel::replaceFromJsonArray(const QJsonArray& arr)
e.address = v.toString();
e.isPublic = true;
}
e.name = QStringLiteral("Account %1").arg(e.address.left(4));
m_entries.append(e);
}
endResetModel();