-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
appkitAppKit related issueAppKit related issueawaiting customerFurther information has been requestedFurther information has been requestedhelp wantedExtra attention is neededExtra attention is needed
Description
When connecting a wallet through ReownAppKitModal, the wallet bottom sheet opens and shows the list of wallets correctly.
However, when a wallet is selected, The wallet opens and shows the connect wallet popup. After clicking Connect, instead of returning to my app instance, one of two things happens:
- If a universal link is configured, the wallet redirects to that website.
- If no universal link is set, my app is opened but as a new instance.
When I manually open my app again, the wallet is connected successfully.
So the deep link works in terms of connecting the wallet, but the redirection does not return properly to the existing app instance.
Can you please let me know the issue
AppKitService
class AppKitService {
static late ReownAppKitModal _appKitModal;
static Future<void> initializeWithContext(BuildContext context) async {
_appKitModal = ReownAppKitModal(
context: context,
projectId: 'xxx',
metadata: const PairingMetadata(
name: 'Outlast',
description: 'Outlast App',
url: 'https://example.com',
icons: ['https://example.com/icon.png'],
redirect: Redirect(
native: 'outlast://',
universal: 'https://outlast.app',
linkMode: true,
),
),
);
await _appKitModal.init();
DeepLinkHandler.init(_appKitModal);
}
static ReownAppKitModal get appKitModal => _appKitModal;
}
DeepLinkHandler
class DeepLinkHandler {
static const _eventChannel = EventChannel('com.outlast.app/events');
static late IReownAppKitModal _appKitModal;
static void init(IReownAppKitModal appKitModal) {
_appKitModal = appKitModal;
_eventChannel.receiveBroadcastStream().listen(onLink, onError: _onError);
}
static void onLink(dynamic link) async {
if (link.toString().startsWith('outlast://') ||
link.toString().startsWith('https://outlast.app')) {
final uri = Uri.parse(link.toString());
await _appKitModal.dispatchEnvelope(link);
}
}
}
Metadata
Metadata
Assignees
Labels
appkitAppKit related issueAppKit related issueawaiting customerFurther information has been requestedFurther information has been requestedhelp wantedExtra attention is neededExtra attention is needed