Skip to content

Commit

Permalink
Support Mini Wallet browser
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Aug 2, 2024
1 parent 262a0a7 commit 2f4a94d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flutter_bird_app/lib/controller/authentication_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'dart:math' as math;
import 'dart:html' as html;

import 'package:eth_sig_util/eth_sig_util.dart';
import 'package:flutter/foundation.dart';
Expand Down Expand Up @@ -323,6 +324,12 @@ class AuthenticationServiceImpl implements AuthenticationService {
return;
}

final isLine = Uri.parse(html.window.location.href).queryParameters['is_line'] != null;
if (wallet.name == 'Mini Wallet' && isLine) {
html.window.parent?.postMessage({'type': 'display_uri', 'data': uri}, "*", []);
return;
}

if (wallet.mobile.native != null) {
await launchUrl(
_convertToWcUri(appLink: wallet.mobile.native!, wcUri: uri),
Expand Down

0 comments on commit 2f4a94d

Please sign in to comment.