Implement load and init methods of RecoveryPlugin class
ishantiw opened this issue · 0 comments
ishantiw commented
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