Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Implement load and init methods of RecoveryPlugin class #9183

Open
Tracked by #6919
ishantiw opened this issue Dec 7, 2023 · 0 comments
Open
Tracked by #6919

Implement load and init methods of RecoveryPlugin class #9183

ishantiw opened this issue Dec 7, 2023 · 0 comments

Comments

@ishantiw
Copy link
Contributor

ishantiw commented Dec 7, 2023

Description

Implement load and init methods of RecoveryPlugin class

class RecoveryPlugin extends BasePlugin {
        private _recoveryManager: SidechainRecoveryManager | MainchainRecoveryManager;

	init(context: PluginInitContext<Record<string, unknown>>): Promise<void> {
		// assign all the config params
	}

	load(): Promise<void> {
		// check whether the chain is mainchain or sidechain

		if (mainchain) {
			this._recoveryManager = new MainchainRecoveryManager()
		} else {
                  // check for mainchainIPC/WS path in config and create               
                     mainchainClient and pass mainchainClient
			this._recoveryManager = new SidechainRecoveryManager()
		}
	}

       // call clean up on RecoveryManager to cleanup apiClients before app shutdown
        unload () {}
}

Acceptance Criteria

  • Should have all the unit test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant