fix: Re-subscribe to chain updates on reconnection if not a clone (#5794)

This prevents issues with bad transaction signatures after chain updates following a temporary disconnect.
This commit is contained in:
Francis O'Brien
2024-05-28 14:06:15 -04:00
committed by GitHub
parent 0b3cad94bc
commit d28d2b5f48
+5
View File
@@ -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;
}