Compare commits

..

4 Commits

5 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,5 @@
# [0.1.0-develop.42](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.41...v0.1.0-develop.42) (2023-07-15)
# [0.1.0-develop.41](https://git.lumeweb.com/LumeWeb/libethsync/compare/v0.1.0-develop.40...v0.1.0-develop.41) (2023-07-14)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libethclient",
"version": "0.1.0-develop.41",
"version": "0.1.0-develop.42",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libethclient",
"version": "0.1.0-develop.41",
"version": "0.1.0-develop.42",
"dependencies": {
"@chainsafe/as-sha256": "^0.3.1",
"@chainsafe/bls": "7.1.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libethsync",
"version": "0.1.0-develop.41",
"version": "0.1.0-develop.42",
"type": "module",
"repository": {
"type": "git",

View File

@ -61,10 +61,7 @@ export default abstract class BaseClient {
}
public get isSynced() {
return (
this._latestPeriod === this.getCurrentPeriod() &&
this.getLastBlock() === this.getCurrentBlock()
);
return this._latestPeriod === this.getCurrentPeriod();
}
public get store(): IStore {

View File

@ -25,4 +25,14 @@ export default class Client extends BaseClient {
this.beaconUrl = config.beaconUrl;
this.http.defaults.baseURL = this.beaconUrl;
}
async sync(): Promise<void> {
await super.sync();
if (!this.booted) {
this.subscribe();
this.booted = true;
}
}
}