From f05a04fbc122c70389840d266c7a7d8d0900da67 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 19 Aug 2019 14:23:54 -0400 Subject: [PATCH] update test to remove custom block --- test/test1.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/test1.js b/test/test1.js index b2268db..eb220da 100644 --- a/test/test1.js +++ b/test/test1.js @@ -95,8 +95,10 @@ async function run() { eventSyncer.init(() => { // TODO: would be nice if trackEvent was smart enough to understand the type of returnValues and do the needed conversions - eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => parseInt(x.rating)), myscan, mymap).subscribe((v) => { + // eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => parseInt(x.rating)), myscan, mymap).subscribe((v) => { // eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => x.rating)).subscribe((v) => { + + eventSyncer.trackEvent(RatingContract, 'Rating').pipe(map(x => parseInt(x.rating)), myscan, mymap).subscribe((v) => { console.dir("value is ") console.dir(v) }); @@ -106,8 +108,10 @@ async function run() { return acc; }, []) + // eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => parseInt(x.rating)), max, distinctUntilChanged()).subscribe((v) => { // eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => parseInt(x.rating)), last()).subscribe((v) => { - eventSyncer.trackEvent(RatingContract, 'Rating', ((x) => true)).pipe(map(x => parseInt(x.rating)), max, distinctUntilChanged()).subscribe((v) => { + + eventSyncer.trackEvent(RatingContract, 'Rating').pipe(map(x => parseInt(x.rating)), max, distinctUntilChanged()).subscribe((v) => { console.dir("max known rating is") console.dir(v) });