-
Notifications
You must be signed in to change notification settings - Fork 2
/
spkDistri.js
39 lines (30 loc) · 1.05 KB
/
spkDistri.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const hive = require("@hiveio/hive-js")
const spkTotal = require("./spk_total.json");
const operations = [];
function getTransfer(to, amount, memo) {
return [
'transfer',
{
from: "threespeakwallet",
to,
amount,
memo
}
]
}
for (const user of Object.keys(spkTotal)) {
if (user.startsWith("oauth2|Steemconnect") === false) {
console.log("Skip", user);
continue;
}
const username = user.replace("oauth2|Steemconnect|", "");
const memo = 'We thank you for your participation in the Speak platform utility token in March 2020, as you will be aware, we deprecated this feature in late 2020. In line with the removal of this feature, we here in provide you with a full refund and due to high work load and other work in progress, we ask your understanding about the time it has taken to return your funds.'
operations.push(getTransfer(username, spkTotal[user].totalHBD.toFixed(3) + " HBD", memo))
}
// let total = 0;
//
// for (const t of operations) {
// total += parseFloat(t[1].amount)
// }
//
// console.log(total)