Skip to content

Commit

Permalink
fix: Re-subscribe to chain updates on reconnection if not a clone (#5794
Browse files Browse the repository at this point in the history
)

This prevents issues with bad transaction signatures after chain updates following a temporary disconnect.
  • Loading branch information
F-OBrien committed May 28, 2024
1 parent 0b3cad9 commit d28d2b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/api/src/base/Init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
protected async _loadMeta (): Promise<boolean> {
// on re-connection to the same chain, we don't want to re-do everything from chain again
if (this._isReady) {
// on re-connection only re-subscribe to chain updates if we are not a clone
if (!this._options.source) {
this._subscribeUpdates();
}

return true;
}

Expand Down

0 comments on commit d28d2b5

Please sign in to comment.