logging
This commit is contained in:
@@ -1070,14 +1070,12 @@ page_container %}
|
|||||||
.reduce((sum, el) => (sum += el.amount), 0)
|
.reduce((sum, el) => (sum += el.amount), 0)
|
||||||
},
|
},
|
||||||
getTokenList: function () {
|
getTokenList: function () {
|
||||||
console.log(this.proofs)
|
|
||||||
const amounts = this.proofs.map(t => t.amount)
|
const amounts = this.proofs.map(t => t.amount)
|
||||||
const counts = {}
|
const counts = {}
|
||||||
|
|
||||||
for (const num of amounts) {
|
for (const num of amounts) {
|
||||||
counts[num] = counts[num] ? counts[num] + 1 : 1
|
counts[num] = counts[num] ? counts[num] + 1 : 1
|
||||||
}
|
}
|
||||||
console.log('counts', counts)
|
|
||||||
return Object.keys(counts).map(k => ({
|
return Object.keys(counts).map(k => ({
|
||||||
value: parseInt(k),
|
value: parseInt(k),
|
||||||
count: parseInt(counts[k]),
|
count: parseInt(counts[k]),
|
||||||
|
|||||||
Reference in New Issue
Block a user