restart method
ℹ️ To be called when you want to abort an ongoing intent or restart the flow when a payment finished. With reinit = true will clear the instance meaning that init() and setTokens() will have to be called again
Implementation
@override
Future<void> restart({bool reinit = false}) async {
_reOwnCore!.logger.d('[$runtimeType] restart');
_pendingIntents.clear();
await _expirePreviousPairings();
if (_connectResponse?.session.isCompleted == false) {
_connectResponse!.session.completeError(
ReownCoreError(code: 5090, message: 'ABORTED'),
);
}
if (reinit) {
_unregisterListeners();
_configuredTokens.clear();
_supportedNamespaces.clear();
_posNamespaces.clear();
_initialized = false;
}
}