onProtocolUrlReceived method

Future<bool> onProtocolUrlReceived(
  1. String url
)

Implementation

Future<bool> onProtocolUrlReceived(String url) async {
  final handled = await _nwcWalletAuthCoordinator.processProtocolUrl(
    context,
    widget.ndkFlutter,
    url,
  );

  if (!handled || !mounted) return handled;

  final connectedWalletId = _nwcWalletAuthCoordinator
      .takeLastConnectedWalletId();
  if (connectedWalletId != null) {
    setState(() {
      _selectedWalletId = connectedWalletId;
    });
    widget.onWalletSelected?.call(connectedWalletId);
  }
  return handled;
}