[bug] Update device blockheight right after initialization to prevent race condition
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 2m25s
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 2m25s
This commit is contained in:
parent
457994c506
commit
0d473cf3d1
@ -156,8 +156,6 @@ export async function init(): Promise<void> {
|
||||
// We connect to all relays now
|
||||
await services.connectAllRelays();
|
||||
|
||||
await services.updateDeviceBlockHeight();
|
||||
|
||||
// We register all the event listeners if we run in an iframe
|
||||
if (window.self !== window.top) {
|
||||
await registerAllListeners();
|
||||
|
@ -1369,6 +1369,7 @@ export default class Services {
|
||||
console.log('handshakeMsg:', handshakeMsg);
|
||||
this.currentBlockHeight = handshakeMsg.chain_tip;
|
||||
console.log('this.currentBlockHeight:', this.currentBlockHeight);
|
||||
this.updateDeviceBlockHeight();
|
||||
if (this.membersList && Object.keys(this.membersList).length === 0) {
|
||||
// We start from an empty list, just copy it over
|
||||
this.membersList = handshakeMsg.peers_list;
|
||||
|
Loading…
x
Reference in New Issue
Block a user