feat(wallet): humanize shared wallet experience

Consolidate wallet account decoding and portfolio handling around the shared Rust IDL decoder. Simplify AMM wallet integration, remove obsolete caches and network plumbing, and cover account selection and live flows.
This commit is contained in:
Ricardo Guilherme Schmidt
2026-08-21 17:38:45 -03:00
parent 62d133e909
commit 8c3e6fccfe
64 changed files with 6268 additions and 27501 deletions
+6 -3
View File
@@ -1448,8 +1448,11 @@ LogosList AmmModuleImpl::resolveTokens(const LogosMap& request, bool wallet_open
LogosList out = LogosList::array();
const auto it = result.value.find("tokens");
if (it != result.value.end() && it->is_array())
for (const auto& row : *it) out.push_back(row);
if (it != result.value.end() && it->is_array()) {
for (auto row : *it) {
row["definitionIdHex"] = normalizeAccountId(jStr(row, "definitionId"));
out.push_back(std::move(row));
}
}
return out;
}
+2 -1
View File
@@ -241,7 +241,8 @@ public:
/// normalized to hex here) — the app owns the set: its configured tokens plus any
/// custom/pasted ids it remembers (held-but-unlisted tokens are not auto-added by
/// the app). Reads each definition and (when `wallet_open`) the wallet, then returns
/// `[{ definitionId (base58), name, totalSupply, holdingId, balance }]`. Every
/// `[{ definitionId (base58), definitionIdHex, name, totalSupply, holdingId,
/// balance }]`. Every
/// row has the same fields — a token the wallet doesn't hold gets `holdingId:""`
/// and `balance:"0"` — held tokens first. A requested id whose definition is
/// unreadable / non-fungible is omitted (the app treats a missing row as