flatEarnings2 = {
const map = new Map();
grainOutput2.distributions.forEach(x => {
x.allocations.forEach(a => {
a.receipts.forEach(r => {
const name = ledger.account(r.id).identity.name;
map.set(name, G.add(map.get(name) || G.ZERO, r.amount));
});
});
});
return map;
}