File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ async function main() {
4141 1337 ,
4242 key ,
4343 'http://localhost:8545' ,
44- 'ws://localhost:8546 ' ,
44+ 'ws://localhost:8545 ' ,
4545 log ,
4646 ) ,
4747 demo : await createClient (
@@ -79,6 +79,9 @@ async function main() {
7979 onDeleted : ( args ) => {
8080 log . info ( "Got deletion event:" , args )
8181 } ,
82+ onError : ( error ) => {
83+ log . error ( "Got error:" , error )
84+ } ,
8285 pollingInterval : 500 ,
8386 transport : "http" ,
8487 } )
@@ -195,17 +198,18 @@ async function main() {
195198 await client . queryEntities ( "ix = 1 || ix = 2 || ix = 3" ) ,
196199 async result => {
197200 const metadata = await client . getEntityMetaData ( result . entityKey )
198- return metadata . owner === await client . getOwnerAddress ( )
201+ return metadata . owner === ( await client . getOwnerAddress ( ) ) . toLocaleLowerCase ( )
199202 }
200203 ) ) . map ( result => result . entityKey )
201204
205+ log . info ( "Entities to delete:" , toDelete )
202206 if ( toDelete . length !== 0 ) {
203207 await client . deleteEntities ( toDelete )
204208 }
205209
206210 log . info ( "Number of entities owned:" , await numOfEntitiesOwned ( ) )
207211
208- log . debug ( "Current balance: " , formatEther ( await client . getRawClient ( ) . httpClient . getBalance ( {
212+ log . info ( "Current balance: " , formatEther ( await client . getRawClient ( ) . httpClient . getBalance ( {
209213 address : await client . getOwnerAddress ( ) ,
210214 blockTag : 'latest'
211215 } ) ) )
You can’t perform that action at this time.
0 commit comments