Skip to content

Commit

Permalink
fix loading webview for email login
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Nov 27, 2024
1 parent e15440f commit f567c18
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,11 @@ class MagicService implements IMagicService {
'x-bundle-id': _packageName,
};
final uri = Uri.parse(UrlConstants.secureService);
final cid = (_connectionChainId ?? '');
final queryParams = {
'projectId': _core.projectId,
'bundleId': _packageName,
if (_connectionChainId != null) 'chainId': _connectionChainId,
// 'bundleId': _packageName,
if (cid.isNotEmpty) 'chainId': cid,
};
final requestUri = uri.replace(queryParameters: queryParams);
await _webViewController.loadRequest(requestUri, headers: headers);
Expand All @@ -555,7 +556,7 @@ class MagicService implements IMagicService {

void _onFrameMessage(JavaScriptMessage jsMessage) async {
if (Platform.isAndroid) {
_core.logger.d('[$runtimeType] JS Console: $jsMessage');
_core.logger.d('[$runtimeType] JS Console: ${jsMessage.message}');
}
try {
final frameMessage = jsMessage.toFrameMessage();
Expand Down

0 comments on commit f567c18

Please sign in to comment.