request method
Future
request({
- required String topic,
- required String chainId,
- required SessionRequestParams request,
override
Implementation
@override
Future<dynamic> request({
required String topic,
required String chainId,
required SessionRequestParams request,
}) async {
_checkInitialized();
await _isValidRequest(
topic,
chainId,
request,
);
final session = sessions.get(topic);
final isLinkMode = _isLinkModeRequest(session);
if (!isLinkMode) {
_confirmOnlineStateOrThrow();
}
final sessionRequest = WcSessionRequestRequest(
chainId: chainId,
request: request,
);
return await core.pairing.sendRequest(
topic,
MethodConstants.WC_SESSION_REQUEST,
sessionRequest.toJson(),
appLink: _getAppLinkIfEnabled(session?.peer.metadata),
);
}