From 5997cfc6943d2d614bdf13713de75edf7e797442 Mon Sep 17 00:00:00 2001
From: Alfreedom <00tango.bromine@icloud.com>
Date: Tue, 29 Oct 2024 15:01:53 +0100
Subject: [PATCH] Minor fixes
---
.../base/ios/Runner/Info-internal.plist | 47 +++++-
.../example/base/ios/Runner/Info.plist | 47 +++++-
.../base/lib/utils/sample_wallets.dart | 4 +-
.../example/modal/ios/Runner/Info.plist | 2 +-
.../example/modal/lib/home_page.dart | 8 +-
.../modal/lib/widgets/debug_drawer.dart | 6 +-
.../lib/modal/appkit_modal_impl.dart | 141 ++++++++++++------
.../lib/modal/constants/string_constants.dart | 13 +-
.../lib/modal/i_appkit_modal_impl.dart | 1 -
.../models/public/appkit_modal_session.dart | 4 +
.../lib/modal/pages/connet_network_page.dart | 14 +-
.../appkit_modal_main_wallets_page.dart | 5 +-
.../models/wc_sample_wallets.dart | 4 +-
.../public/appkit_modal_balance_button.dart | 3 +-
.../network_service_items_listener.dart | 2 +-
packages/reown_appkit/pubspec.yaml | 6 +
16 files changed, 235 insertions(+), 72 deletions(-)
diff --git a/packages/reown_appkit/example/base/ios/Runner/Info-internal.plist b/packages/reown_appkit/example/base/ios/Runner/Info-internal.plist
index dbaa42e..0327438 100644
--- a/packages/reown_appkit/example/base/ios/Runner/Info-internal.plist
+++ b/packages/reown_appkit/example/base/ios/Runner/Info-internal.plist
@@ -41,8 +41,53 @@
LSApplicationQueriesSchemes
- wcflutterwallet-internal
+ wirexwallet
+ stasis
+ omni
+ strikex
+ bitcoincom
+ bnc
+ kryptogo
+ roninwallet
+ moonstake
+ ripio
+ frontier
+ qubic
+ dropp
+ safepalwallet
+ bee
+ shido
+ foxwallet
+ exodus
+ coolwallet
+ shinobi-wallet
+ halowallet
+ spotonchain
+ rainbow
+ obvious
+ robinhood-wallet
+ cbwallet
+ okto
+ bitkeep
+ bitizen
+ ape
+ uniswap
+ zerion
+ oasys-wallet
+ coinstats
+ ledgerlive
+ safe
+ okex
+ trust
+ thorwallet
+ krakenwallet
+ coinwallet
+ mewwallet
+ metamask
+ avacus
walletapp
+ wcflutterwallet-internal
+ rn-web3wallet-internal
ITSAppUsesNonExemptEncryption
diff --git a/packages/reown_appkit/example/base/ios/Runner/Info.plist b/packages/reown_appkit/example/base/ios/Runner/Info.plist
index f70379f..43ad88f 100644
--- a/packages/reown_appkit/example/base/ios/Runner/Info.plist
+++ b/packages/reown_appkit/example/base/ios/Runner/Info.plist
@@ -43,8 +43,53 @@
LSApplicationQueriesSchemes
- wcflutterwallet
+ wirexwallet
+ stasis
+ omni
+ strikex
+ bitcoincom
+ bnc
+ kryptogo
+ roninwallet
+ moonstake
+ ripio
+ frontier
+ qubic
+ dropp
+ safepalwallet
+ bee
+ shido
+ foxwallet
+ exodus
+ coolwallet
+ shinobi-wallet
+ halowallet
+ spotonchain
+ rainbow
+ obvious
+ robinhood-wallet
+ cbwallet
+ okto
+ bitkeep
+ bitizen
+ ape
+ uniswap
+ zerion
+ oasys-wallet
+ coinstats
+ ledgerlive
+ safe
+ okex
+ trust
+ thorwallet
+ krakenwallet
+ coinwallet
+ mewwallet
+ metamask
+ avacus
walletapp
+ wcflutterwallet
+ rn-web3wallet
LSRequiresIPhoneOS
diff --git a/packages/reown_appkit/example/base/lib/utils/sample_wallets.dart b/packages/reown_appkit/example/base/lib/utils/sample_wallets.dart
index 24b43c3..cc3a800 100644
--- a/packages/reown_appkit/example/base/lib/utils/sample_wallets.dart
+++ b/packages/reown_appkit/example/base/lib/utils/sample_wallets.dart
@@ -23,7 +23,7 @@ class WCSampleWallets {
'name': 'RN Wallet (internal)',
'platform': ['ios', 'android'],
'id': '1234567890123456789012345678922',
- 'schema': 'rn-web3wallet://wc',
+ 'schema': 'rn-web3wallet-internal://',
'bundleId': 'com.walletconnect.web3wallet.rnsample.internal',
'universal': 'https://appkit-lab.reown.com/rn_walletkit_internal',
},
@@ -58,7 +58,7 @@ class WCSampleWallets {
'name': 'RN Wallet',
'platform': ['ios', 'android'],
'id': '123456789012345678901234567892',
- 'schema': 'rn-web3wallet://wc',
+ 'schema': 'rn-web3wallet://',
'bundleId': 'com.walletconnect.web3wallet.rnsample',
'universal': 'https://appkit-lab.reown.com/rn_walletkit',
},
diff --git a/packages/reown_appkit/example/modal/ios/Runner/Info.plist b/packages/reown_appkit/example/modal/ios/Runner/Info.plist
index 119d42e..a97c4c3 100644
--- a/packages/reown_appkit/example/modal/ios/Runner/Info.plist
+++ b/packages/reown_appkit/example/modal/ios/Runner/Info.plist
@@ -69,7 +69,6 @@
cbwallet
okto
bitkeep
- hyperPay
bitizen
ape
uniswap
@@ -90,6 +89,7 @@
wcflutterwallet
wcflutterwallet-internal
rn-web3wallet
+ rn-web3wallet-internal
LSRequiresIPhoneOS
diff --git a/packages/reown_appkit/example/modal/lib/home_page.dart b/packages/reown_appkit/example/modal/lib/home_page.dart
index d4d9652..2c1676f 100644
--- a/packages/reown_appkit/example/modal/lib/home_page.dart
+++ b/packages/reown_appkit/example/modal/lib/home_page.dart
@@ -207,10 +207,14 @@ class _MyHomePageState extends State {
final siweAuthValue = prefs.getBool('appkit_siwe_auth') ?? true;
// See https://docs.reown.com/appkit/flutter/core/custom-chains
+ // Add extra chains
// final extraChains = ReownAppKitModalNetworks.extra['eip155']!;
// ReownAppKitModalNetworks.addSupportedNetworks('eip155', extraChains);
- // ReownAppKitModalNetworks.removeSupportedNetworks('eip155');
+ // Remove Solana support
+ // ReownAppKitModalNetworks.removeSupportedNetworks('solana');
+ // Remove every test network
// ReownAppKitModalNetworks.removeTestNetworks();
+ // Add custom chains
ReownAppKitModalNetworks.addSupportedNetworks('polkadot', [
ReownAppKitModalNetworkInfo(
name: 'Polkadot',
@@ -247,7 +251,7 @@ class _MyHomePageState extends State {
AppKitSocialOption.Apple,
AppKitSocialOption.Discord,
],
- showMainWallets: false, // OPTIONAL - true by default
+ // showMainWallets: false, // OPTIONAL - true by default
)
: null,
// requiredNamespaces: {},
diff --git a/packages/reown_appkit/example/modal/lib/widgets/debug_drawer.dart b/packages/reown_appkit/example/modal/lib/widgets/debug_drawer.dart
index 7db646e..c74f71a 100644
--- a/packages/reown_appkit/example/modal/lib/widgets/debug_drawer.dart
+++ b/packages/reown_appkit/example/modal/lib/widgets/debug_drawer.dart
@@ -182,7 +182,7 @@ class _DebugDrawerState extends State with WidgetsBindingObserver {
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
),
- title: const Text('Analytics On'),
+ title: const Text('Analytics'),
titleTextStyle: TextStyle(
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
@@ -203,7 +203,7 @@ class _DebugDrawerState extends State with WidgetsBindingObserver {
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
),
- title: const Text('Email Wallet On'),
+ title: const Text('Email & Socials'),
titleTextStyle: TextStyle(
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
@@ -224,7 +224,7 @@ class _DebugDrawerState extends State with WidgetsBindingObserver {
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
),
- title: const Text('1-CA + SIWE On'),
+ title: const Text('1-CA + SIWE'),
titleTextStyle: TextStyle(
color:
ReownAppKitModalTheme.colorsOf(context).foreground100,
diff --git a/packages/reown_appkit/lib/modal/appkit_modal_impl.dart b/packages/reown_appkit/lib/modal/appkit_modal_impl.dart
index 3b27493..e935a94 100644
--- a/packages/reown_appkit/lib/modal/appkit_modal_impl.dart
+++ b/packages/reown_appkit/lib/modal/appkit_modal_impl.dart
@@ -329,6 +329,10 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
}
}
+ _appKit.core.logger.d('[$runtimeType] wcSessions ${wcSessions.length}');
+ _appKit.core.logger
+ .d('[$runtimeType] _currentSession ${_currentSession?.toJson()}');
+
// There's a session stored
if (wcSessions.isNotEmpty) {
await _storeSession(ReownAppKitModalSession(
@@ -477,42 +481,71 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
return;
}
- _chainBalance = null;
- final tokenName = chainInfo.currency;
- final formattedBalance = CoreUtils.formatChainBalance(_chainBalance);
- balanceNotifier.value = '$formattedBalance $tokenName';
+ try {
+ _chainBalance = null;
+ final tokenName = chainInfo.currency;
+ final formattedBalance = CoreUtils.formatChainBalance(_chainBalance);
+ balanceNotifier.value = '$formattedBalance $tokenName';
- final hasValidSession = _isConnected && _currentSession != null;
- if (switchChain && hasValidSession && _currentSelectedChainId != null) {
- final namespace = ReownAppKitModalNetworks.getNamespaceForChainId(
- chainInfo.chainId,
- );
- final approvedChains = _currentSession!.getApprovedChains(
- namespace: namespace,
- );
- final newCaip2Chain = ReownAppKitModalNetworks.getCaip2Chain(
- chainInfo.chainId,
- );
- final hasChainAlready = (approvedChains ?? []).contains(newCaip2Chain);
- if (!hasChainAlready) {
- requestSwitchToChain(chainInfo);
- final hasSwitchMethod = _currentSession!.hasSwitchMethod();
- if (hasSwitchMethod) {
- launchConnectedWallet();
+ final hasValidSession = _isConnected && _currentSession != null;
+ if (switchChain && hasValidSession && _currentSelectedChainId != null) {
+ final namespace = ReownAppKitModalNetworks.getNamespaceForChainId(
+ chainInfo.chainId,
+ );
+ final approvedChains = _currentSession!.getApprovedChains(
+ namespace: namespace,
+ );
+ final newCaip2Chain = ReownAppKitModalNetworks.getCaip2Chain(
+ chainInfo.chainId,
+ );
+ final hasChainAlready = (approvedChains ?? []).contains(newCaip2Chain);
+ if (!hasChainAlready) {
+ requestSwitchToChain(chainInfo);
+ final hasSwitchMethod = _currentSession!.hasSwitchMethod();
+ if (hasSwitchMethod) {
+ launchConnectedWallet();
+ }
+ } else {
+ await _setLocalEthChain(chainInfo.chainId, logEvent: logEvent);
}
} else {
await _setLocalEthChain(chainInfo.chainId, logEvent: logEvent);
}
- } else {
- await _setLocalEthChain(chainInfo.chainId, logEvent: logEvent);
+ } on JsonRpcError catch (e) {
+ onModalError.broadcast(ModalError(e.message ?? 'An error occurred'));
+ } on ReownAppKitModalException catch (e) {
+ onModalError.broadcast(ModalError(e.message));
+ } catch (e) {
+ onModalError.broadcast(ModalError('An error occurred'));
}
}
/// Will get the list of available chains to add
- @Deprecated('User getApprovedChains()')
@override
List? getAvailableChains() {
- return getApprovedChains();
+ // if there's no session or if supportsAddChain method then every chain can be used
+ if (_currentSession == null) {
+ // meaning all chains in the list are available
+ return null;
+ }
+ // Valid only for EVM chains
+ final hasSwitchMethod = _currentSession!.hasSwitchMethod();
+ if (!hasSwitchMethod) {
+ return getApprovedChains();
+ }
+
+ List availableChains = [];
+ final namespaces = ReownAppKitModalNetworks.getAllSupportedNamespaces();
+ for (var ns in namespaces) {
+ final chains =
+ ReownAppKitModalNetworks.getAllSupportedNetworks(namespace: ns)
+ .map(
+ (e) => '$ns:${e.chainId}',
+ )
+ .toList();
+ availableChains.addAll(chains);
+ }
+ return availableChains;
}
/// Will get the list of already approved chains by the wallet (to switch to)
@@ -549,7 +582,7 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
if (isConnected) {
await _storage.set(
StorageConstants.selectedChainId,
- {'chainId': _currentSelectedChainId!},
+ {'chainId': _currentSelectedChainId ?? '1'},
);
}
} catch (e) {
@@ -823,6 +856,8 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
@override
Future buildConnectionUri() async {
if (!_isConnected) {
+ /// TODO Qs: How do I handle SIWE if non-EVM chains are included?
+ /// TODO Qs: How do I handle switch to Solana from EVM chain?
try {
if (_siweService.enabled) {
final walletRedirect = _explorerService.getWalletRedirect(
@@ -1281,7 +1316,6 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
_optionalNamespaces = {};
_lastChainEmitted = null;
_supportsOneClickAuth = false;
- _relayConnected = false;
_status = ReownAppKitModalStatus.idle;
await Future.delayed(Duration(milliseconds: 500));
_notify();
@@ -1434,6 +1468,14 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
Future requestSwitchToChain(
ReownAppKitModalNetworkInfo newChain,
) async {
+ final namespace = ReownAppKitModalNetworks.getNamespaceForChainId(
+ newChain.chainId,
+ );
+ if (namespace != NetworkUtils.eip155) {
+ // If chain is not EVM then there's no need to request a switch since it doesn't exist such method for non-EVM chains
+ // Therefor at this point the selected non-EVM chain is either already approved, invalidating the need of a switch call, or not approved, failing with the following error.
+ throw ReownAppKitModalException('Unsupported Chain');
+ }
if (_currentSession?.sessionService.isMagic == true) {
await selectChain(newChain);
return;
@@ -1472,9 +1514,20 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
try {
// Otherwise it meas chain has to be added.
return await requestAddChain(newChain);
+ } on JsonRpcError catch (e) {
+ _appKit.core.logger.e(
+ '[$runtimeType] Switch to chain error: ${e.toJson()}',
+ );
+ rethrow;
+ } on ReownAppKitModalException catch (e) {
+ _appKit.core.logger.e(
+ '[$runtimeType] Switch to chain error: ${e.message}',
+ stackTrace: e.stackTrace,
+ );
+ rethrow;
} catch (e, s) {
_appKit.core.logger.e(
- '[$runtimeType] requestSwitchToChain error: $e',
+ '[$runtimeType] Switch to chain error: ${e.toString()}',
stackTrace: s,
);
rethrow;
@@ -1506,13 +1559,12 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
_currentSelectedChainId = newChain.chainId;
await _setSesionAndChainData(_currentSession!);
return;
+ } on JsonRpcError {
+ await _setLocalEthChain(_currentSelectedChainId!);
+ rethrow;
} catch (e, s) {
- _appKit.core.logger.e(
- '[$runtimeType] requestAddChain error: $e',
- stackTrace: s,
- );
await _setLocalEthChain(_currentSelectedChainId!);
- throw JsonRpcError(code: 5002, message: 'User rejected methods.');
+ throw ReownAppKitModalException(e.toString(), s);
}
}
@@ -1550,12 +1602,13 @@ class ReownAppKitModal with ChangeNotifier implements IReownAppKitModal {
final walletId = storedWalletId?['walletId'];
await _storage.deleteAll();
await _explorerService.storeRecentWalletId(walletId);
- } catch (_) {
+ } catch (e, s) {
+ _appKit.core.logger.e('[$runtimeType] _cleanSession $e', stackTrace: s);
await _storage.deleteAll();
}
if (event) {
onModalDisconnect.broadcast(ModalDisconnect(
- topic: args?.topic,
+ topic: args?.topic ?? _currentSession?.topic,
id: args?.id,
));
}
@@ -1988,17 +2041,17 @@ extension _AppKitModalExtension on ReownAppKitModal {
onSessionEventEvent.broadcast(args);
if (args?.name == EventsConstants.chainChanged) {
_currentSelectedChainId = args?.data?.toString();
- } else if (args?.name == EventsConstants.accountsChanged) {
- try {
- // TODO implement account change
- if (_siweService.signOutOnAccountChange) {
+ }
+ if (args?.name == EventsConstants.accountsChanged) {
+ if (_siweService.enabled && _siweService.signOutOnAccountChange) {
+ try {
await _siweService.signOut();
+ } catch (e, s) {
+ _appKit.core.logger.e(
+ '[$runtimeType] _onSessionEvent error: $e',
+ stackTrace: s,
+ );
}
- } catch (e, s) {
- _appKit.core.logger.e(
- '[$runtimeType] _onSessionEvent error: $e',
- stackTrace: s,
- );
}
}
_notify();
diff --git a/packages/reown_appkit/lib/modal/constants/string_constants.dart b/packages/reown_appkit/lib/modal/constants/string_constants.dart
index 38fd9b8..9d3a426 100644
--- a/packages/reown_appkit/lib/modal/constants/string_constants.dart
+++ b/packages/reown_appkit/lib/modal/constants/string_constants.dart
@@ -33,13 +33,12 @@ class UIConstants {
class StorageConstants {
// Storage
- static const String recentWalletId =
- '${CoreConstants.X_SDK_TYPE}_recentWallet';
- static const String connectedWalletData =
- '${CoreConstants.X_SDK_TYPE}_walletData';
- static const String selectedChainId =
- '${CoreConstants.X_SDK_TYPE}_selectedChainId';
- static const String modalSession = '${CoreConstants.X_SDK_TYPE}_session';
+ static const _prefix = '${CoreConstants.X_SDK_TYPE}:$packageVersion//';
+
+ static const String recentWalletId = '${_prefix}recentWallet';
+ static const String connectedWalletData = '${_prefix}walletData';
+ static const String selectedChainId = '${_prefix}selectedChainId';
+ static const String modalSession = '${_prefix}session';
}
class UrlConstants {
diff --git a/packages/reown_appkit/lib/modal/i_appkit_modal_impl.dart b/packages/reown_appkit/lib/modal/i_appkit_modal_impl.dart
index cc54c89..d1db8e7 100644
--- a/packages/reown_appkit/lib/modal/i_appkit_modal_impl.dart
+++ b/packages/reown_appkit/lib/modal/i_appkit_modal_impl.dart
@@ -101,7 +101,6 @@ abstract class IReownAppKitModal with ChangeNotifier {
void launchConnectedWallet();
/// List of available chains to be added in connected wallet
- @Deprecated('User getApprovedChains()')
List? getAvailableChains();
/// List of approved chains by connected wallet
diff --git a/packages/reown_appkit/lib/modal/models/public/appkit_modal_session.dart b/packages/reown_appkit/lib/modal/models/public/appkit_modal_session.dart
index c9a95e7..6cdcfbe 100644
--- a/packages/reown_appkit/lib/modal/models/public/appkit_modal_session.dart
+++ b/packages/reown_appkit/lib/modal/models/public/appkit_modal_session.dart
@@ -228,6 +228,10 @@ class ReownAppKitModalSession {
// toJson() would convert ReownAppKitModalSession to a SessionData kind of map
// no matter if Coinbase Wallet or Email Wallet is connected
Map toJson() {
+ if (_sessionData != null) {
+ return _sessionData!.toJson();
+ }
+
final sessionData = SessionData(
topic: topic ?? '',
pairingTopic: pairingTopic ?? '',
diff --git a/packages/reown_appkit/lib/modal/pages/connet_network_page.dart b/packages/reown_appkit/lib/modal/pages/connet_network_page.dart
index 2ca5274..e85bcc2 100644
--- a/packages/reown_appkit/lib/modal/pages/connet_network_page.dart
+++ b/packages/reown_appkit/lib/modal/pages/connet_network_page.dart
@@ -61,8 +61,8 @@ class _ConnectNetworkPageState extends State
);
await _magicService.switchNetwork(chainId: newCaip2Chain);
} else {
- _appKitModal!.launchConnectedWallet();
try {
+ _appKitModal!.launchConnectedWallet();
await _appKitModal!.requestSwitchToChain(widget.chainInfo);
final chainId = widget.chainInfo.chainId;
final namespace = ReownAppKitModalNetworks.getNamespaceForChainId(
@@ -79,8 +79,14 @@ class _ConnectNetworkPageState extends State
}
});
}
+ } on JsonRpcError catch (e) {
+ setState(
+ () => errorEvent = ModalError(e.message ?? 'An error occurred'),
+ );
+ } on ReownAppKitModalException catch (e) {
+ setState(() => errorEvent = ModalError(e.message));
} catch (e) {
- setState(() {});
+ setState(() => errorEvent = ModalError('An error occurred'));
}
}
}
@@ -156,7 +162,7 @@ class _ConnectNetworkPageState extends State
const SizedBox.square(dimension: 20.0),
errorEvent != null
? Text(
- 'Switch declined',
+ errorEvent?.message ?? 'Switch declined',
textAlign: TextAlign.center,
style: themeData.textStyles.paragraph500.copyWith(
color: themeColors.error100,
@@ -174,7 +180,7 @@ class _ConnectNetworkPageState extends State
const SizedBox.square(dimension: 8.0),
errorEvent != null
? Text(
- 'Switch can be declined by the user or if a previous request is still active',
+ 'Switch can be declined by the user or if the wallet doesn\'t support the selected chain.',
textAlign: TextAlign.center,
style: themeData.textStyles.small500.copyWith(
color: themeColors.foreground200,
diff --git a/packages/reown_appkit/lib/modal/pages/public/appkit_modal_main_wallets_page.dart b/packages/reown_appkit/lib/modal/pages/public/appkit_modal_main_wallets_page.dart
index 06bc6f4..6b33996 100644
--- a/packages/reown_appkit/lib/modal/pages/public/appkit_modal_main_wallets_page.dart
+++ b/packages/reown_appkit/lib/modal/pages/public/appkit_modal_main_wallets_page.dart
@@ -65,8 +65,11 @@ class _AppKitModalMainWalletsPageState
double maxHeight = isPortrait
? (kListItemHeight * 6)
: ResponsiveData.maxHeightOf(context);
+
+ final isSignIn = _magicService.isEmailEnabled.value ||
+ _magicService.isSocialEnabled.value;
return ModalNavbar(
- title: 'Connect wallet',
+ title: isSignIn ? 'Sign in' : 'Connect wallet',
leftAction: NavbarActionButton(
asset: 'lib/modal/assets/icons/help.svg',
action: () {
diff --git a/packages/reown_appkit/lib/modal/services/explorer_service/models/wc_sample_wallets.dart b/packages/reown_appkit/lib/modal/services/explorer_service/models/wc_sample_wallets.dart
index 1d40759..ccfa0b3 100644
--- a/packages/reown_appkit/lib/modal/services/explorer_service/models/wc_sample_wallets.dart
+++ b/packages/reown_appkit/lib/modal/services/explorer_service/models/wc_sample_wallets.dart
@@ -25,7 +25,7 @@ class WCSampleWallets {
'name': 'RN Wallet (internal)',
'platform': ['ios', 'android'],
'id': '1234567890123456789012345678922',
- 'schema': 'rn-web3wallet://wc',
+ 'schema': 'rn-web3wallet-internal://',
'bundleId': 'com.walletconnect.web3wallet.rnsample.internal',
'universal': 'https://appkit-lab.reown.com/rn_walletkit_internal',
},
@@ -60,7 +60,7 @@ class WCSampleWallets {
'name': 'RN Wallet',
'platform': ['ios', 'android'],
'id': '123456789012345678901234567892',
- 'schema': 'rn-web3wallet://wc',
+ 'schema': 'rn-web3wallet://',
'bundleId': 'com.walletconnect.web3wallet.rnsample',
'universal': 'https://appkit-lab.reown.com/rn_walletkit',
},
diff --git a/packages/reown_appkit/lib/modal/widgets/public/appkit_modal_balance_button.dart b/packages/reown_appkit/lib/modal/widgets/public/appkit_modal_balance_button.dart
index 0013f91..3b67c81 100644
--- a/packages/reown_appkit/lib/modal/widgets/public/appkit_modal_balance_button.dart
+++ b/packages/reown_appkit/lib/modal/widgets/public/appkit_modal_balance_button.dart
@@ -48,7 +48,6 @@ class _AppKitModalBalanceButtonState extends State {
final imageId = ReownAppKitModalNetworks.getNetworkIconId(chainId);
_tokenImage = GetIt.I().getAssetImageUrl(imageId);
final balance = widget.appKitModal.balanceNotifier.value;
- debugPrint('[$runtimeType] $balance');
if (balance.contains(AppKitModalBalanceButton.balanceDefault)) {
_tokenImage = '';
}
@@ -118,7 +117,7 @@ class _AppKitModalBalanceButtonState extends State {
)
: RoundedIcon(
imageUrl: _tokenImage!,
- size: widget.size.height + 2.0,
+ size: widget.size.height * 0.55,
),
const SizedBox.square(dimension: 4.0),
ValueListenableBuilder(
diff --git a/packages/reown_appkit/lib/modal/widgets/value_listenable_builders/network_service_items_listener.dart b/packages/reown_appkit/lib/modal/widgets/value_listenable_builders/network_service_items_listener.dart
index e843c18..1d2eacd 100644
--- a/packages/reown_appkit/lib/modal/widgets/value_listenable_builders/network_service_items_listener.dart
+++ b/packages/reown_appkit/lib/modal/widgets/value_listenable_builders/network_service_items_listener.dart
@@ -42,7 +42,7 @@ class NetworkServiceItemsListener extends StatelessWidget {
extension on List> {
List> parseItems(BuildContext context) {
final service = ModalProvider.of(context).instance;
- final supportedChains = service.getApprovedChains();
+ final supportedChains = service.getAvailableChains();
if (supportedChains == null) {
return this
..sort((a, b) {
diff --git a/packages/reown_appkit/pubspec.yaml b/packages/reown_appkit/pubspec.yaml
index 3d2a506..ec6a7c6 100644
--- a/packages/reown_appkit/pubspec.yaml
+++ b/packages/reown_appkit/pubspec.yaml
@@ -27,7 +27,11 @@ dependencies:
plugin_platform_interface: ^2.1.8
qr_flutter_wc: ^0.0.3
reown_core: ^1.0.2
+ # reown_core:
+ # path: ../reown_core/
reown_sign: ^1.0.2
+ # reown_sign:
+ # path: ../reown_sign/
shimmer: ^3.0.0
uuid: ^4.5.1
webview_flutter: ^4.8.0
@@ -47,6 +51,8 @@ dev_dependencies:
mockito: ^5.4.3
package_info_plus: ^8.0.2
reown_walletkit: ^1.0.2
+ # reown_walletkit:
+ # path: ../reown_walletkit/
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec