Skip to content

Commit

Permalink
Bug bashes fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Feb 3, 2025
1 parent e356bed commit 4865bdf
Show file tree
Hide file tree
Showing 28 changed files with 1,478 additions and 719 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ Future<SessionRequestParams?> getParams(
],
);
case 'solana_signMessage':
final bytes = utf8.encode('Welcome to Flutter AppKit on Solana');
final message = base58.encode(bytes);
return SessionRequestParams(
method: method,
params: {
'pubkey': address,
'message': 'Welcome to Flutter AppKit on Solana',
'message': message,
},
);
case 'solana_signTransaction':
Expand Down
7 changes: 7 additions & 0 deletions packages/reown_appkit/lib/modal/appkit_modal_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,10 @@ class ReownAppKitModal
bool inBrowser = false,
}) {
final walletName = _selectedWallet!.listing.name;
final walletId = _selectedWallet!.listing.id;
final event = SelectWalletEvent(
name: walletName,
explorerId: walletId,
platform: inBrowser ? AnalyticsPlatform.web : AnalyticsPlatform.mobile,
);
_analyticsService.sendEvent(event);
Expand Down Expand Up @@ -1569,6 +1571,8 @@ class ReownAppKitModal
blockchainId.toJson(),
);
} catch (_) {}
} else {
_blockchainIdentity = null;
}

_status = ReownAppKitModalStatus.initialized;
Expand Down Expand Up @@ -2162,15 +2166,18 @@ extension _AppKitModalExtension on ReownAppKitModal {
if (_selectedWallet == null) {
_analyticsService.sendEvent(ConnectSuccessEvent(
name: 'WalletConnect',
explorerId: '',
method: AnalyticsPlatform.qrcode,
));
await _storage.delete(StorageConstants.recentWalletId);
await _storage.delete(StorageConstants.connectedWalletData);
} else {
_explorerService.storeConnectedWallet(_selectedWallet);
final walletName = _selectedWallet!.listing.name;
final walletId = _selectedWallet!.listing.id;
_analyticsService.sendEvent(ConnectSuccessEvent(
name: walletName,
explorerId: walletId,
method: AnalyticsPlatform.mobile,
));
}
Expand Down
5 changes: 3 additions & 2 deletions packages/reown_appkit/lib/modal/models/send_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class SendData {
factory SendData.fromRawJson(String str) =>
SendData.fromJson(json.decode(str));

String toRawJson() => json.encode(toJson());

factory SendData.fromJson(Map<String, dynamic> json) => SendData(
amount: json['amount'],
address: json['address'],
Expand All @@ -32,4 +30,7 @@ class SendData {
'amount': amount,
'address': address,
};

@override
String toString() => json.encode(toJson());
}
1 change: 1 addition & 0 deletions packages/reown_appkit/lib/modal/pages/activity_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class _ActivityListViewBuilderState extends State<ActivityListViewBuilder> {
final activityData = await _blockchainService.getHistory(
address: _currentAddress,
cursor: _currentCursor,
caip2Chain: _currentChain,
);
_activities.clear();
final newItems = activityData.data ?? <Activity>[];
Expand Down
Loading

0 comments on commit 4865bdf

Please sign in to comment.