diff --git a/example/lib/home_page.dart b/example/lib/home_page.dart index a15c9359..191d288d 100644 --- a/example/lib/home_page.dart +++ b/example/lib/home_page.dart @@ -1,10 +1,10 @@ import 'package:fl_toast/fl_toast.dart'; import 'package:flutter/material.dart'; -import 'package:walletconnect_flutter_dapp/utils/constants.dart'; -import 'package:walletconnect_flutter_dapp/utils/crypto/siwe_service.dart'; import 'package:web3modal_flutter/web3modal_flutter.dart'; +import 'package:walletconnect_flutter_dapp/utils/constants.dart'; +import 'package:walletconnect_flutter_dapp/utils/crypto/siwe_service.dart'; import 'package:walletconnect_flutter_dapp/widgets/logger_widget.dart'; import 'package:walletconnect_flutter_dapp/widgets/session_widget.dart'; import 'package:walletconnect_flutter_dapp/utils/dart_defines.dart'; diff --git a/lib/services/w3m_service/models/w3m_session.dart b/lib/services/w3m_service/models/w3m_session.dart index 65854902..917ce11e 100644 --- a/lib/services/w3m_service/models/w3m_session.dart +++ b/lib/services/w3m_service/models/w3m_session.dart @@ -28,7 +28,6 @@ class W3MSession { CoinbaseData? coinbaseData, MagicData? magicData, SIWESession? siweSession, - List? cacaos, }) : _sessionData = sessionData, _coinbaseData = coinbaseData, _magicData = magicData, @@ -40,7 +39,6 @@ class W3MSession { final coinbaseDataString = map['coinbaseData']; final magicDataString = map['magicData']; final siweSession = map['siweSession']; - final cacaos = map['cacaos'] as List?; return W3MSession( sessionData: sessionDataString != null ? SessionData.fromJson(sessionDataString) @@ -52,7 +50,6 @@ class W3MSession { magicDataString != null ? MagicData.fromJson(magicDataString) : null, siweSession: siweSession != null ? SIWESession.fromJson(siweSession) : null, - cacaos: cacaos?.map((c) => Cacao.fromJson(c)).toList(), ); } @@ -61,7 +58,6 @@ class W3MSession { CoinbaseData? coinbaseData, MagicData? magicData, SIWESession? siweSession, - List? cacaos, }) { return W3MSession( sessionData: sessionData ?? _sessionData, diff --git a/lib/services/w3m_service/w3m_service.dart b/lib/services/w3m_service/w3m_service.dart index 96bc192c..094591d2 100644 --- a/lib/services/w3m_service/w3m_service.dart +++ b/lib/services/w3m_service/w3m_service.dart @@ -1587,7 +1587,7 @@ extension _W3MServiceExtension on W3MService { if (args != null) { if (args.session != null) { // IF 1-CA SUPPORTED WE SHOULD CALL SIWECONGIF METHODS HERE - final session = await _settleSession(args.session!, cacaos: args.auths); + final session = await _settleSession(args.session!); final namespace = args.session!.namespaces[StringConstants.namespace]!; final chains = namespace.chains!.map((c) => c.split(':').last).toList() ..sort(); @@ -1649,10 +1649,7 @@ extension _W3MServiceExtension on W3MService { } // HAS TO BE CALLED JUST ONCE ON CONNECTION - Future _settleSession( - SessionData sessionData, { - List? cacaos, - }) async { + Future _settleSession(SessionData sessionData) async { if (_currentSelectedChain == null) { final chains = NamespaceUtils.getChainIdsFromNamespaces( namespaces: sessionData.namespaces, @@ -1660,7 +1657,7 @@ extension _W3MServiceExtension on W3MService { final chainId = chains.first.split(':').last.toString(); _currentSelectedChain = W3MChainPresets.chains[chainId]; } - final session = W3MSession(sessionData: sessionData, cacaos: cacaos); + final session = W3MSession(sessionData: sessionData); await _setSesionAndChainData(session); if (_selectedWallet == null) { analyticsService.instance.sendEvent(ConnectSuccessEvent(