Skip to content
Snippets Groups Projects
Commit e3786980 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Fixed Post Observer example (wrong account has been specified to manabar observer)

parent 566d3a23
No related branches found
No related tags found
1 merge request!4Draft: Post Observer example fix
Pipeline #82930 passed
......@@ -147,7 +147,7 @@
}
}
const actualBotWork = async (accountToObserve) => {
const actualBotWork = async (accountToObserve, voterAccount) => {
work = bot.observe.accountOperations(accountToObserve).subscribe({
next({ op, transaction: { block: { number } } }) {
new CommentVisitor(number).accept(op);
......@@ -157,7 +157,7 @@
}
});
manaWork = bot.observe.accountFullManabar(accountToObserve).subscribe({
manaWork = bot.observe.accountFullManabar(voterAccount).subscribe({
next() {
const key = posts.keys().next().value;
if (!key)
......@@ -229,7 +229,7 @@
log(`Observing account posts: "${accountToObserve}"`);
actualBotWork(accountToObserve).catch((error) => { log(error, true); });
actualBotWork(accountToObserve, voterName).catch((error) => { log(error, true); });
running = true;
startBtn.innerText = 'Stop';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment