Skip to content
Snippets Groups Projects
Commit 62fbf8e3 authored by Bernardo Cardoso's avatar Bernardo Cardoso
Browse files

Don't detect vested transfer as a Transfer

parent f5b5c1c3
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,10 @@ async function getAPI() { ...@@ -61,7 +61,10 @@ async function getAPI() {
*/ */
function getTransfers(blockEvents) { function getTransfers(blockEvents) {
const transfers = blockEvents const transfers = blockEvents
.filter((record) => (record.event.section === 'balances' && record.event.method === 'Transfer')) .filter((record, idx) =>
(record.event.section === 'balances' && record.event.method === 'Transfer') &&
!(blockEvents[idx+1].event.section === 'vesting' && blockEvents[idx+1].event.method === 'VestingUpdated')
)
.map(({ event: { data } }) => ({ .map(({ event: { data } }) => ({
from: data[0].toHuman(), from: data[0].toHuman(),
to: data[1].toHuman(), to: data[1].toHuman(),
......
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