Skip to content

Commit fd24209

Browse files
author
Sterling Long
committed
2.1.7
1 parent fecffb7 commit fd24209

11 files changed

Lines changed: 47 additions & 27 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 2.1.6
1+
## 2.1.7
22

33
- Removed image from QR Code, it was sometimes causing problems and needs more testing
44

example/sign/lib/utils/crypto/eip155.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class EIP155 {
209209
final Transaction t = Transaction.callContract(
210210
contract: contract,
211211
function: balanceFunction,
212-
parameters: [EthereumAddress.fromHex(ContractDetails.balanceAddress)],
212+
parameters: [EthereumAddress.fromHex(address)],
213213
);
214214

215215
return await web3App.request(
@@ -218,7 +218,7 @@ class EIP155 {
218218
request: SessionRequestParams(
219219
method: 'eth_sendTransaction',
220220
// Check the `web3dart_extension` file for this function
221-
params: [t.toJson(fromAddress: ContractDetails.balanceAddress)],
221+
params: [t.toJson(fromAddress: address)],
222222
),
223223
);
224224
}

lib/constants/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22

33
class WalletConnectModalConstants {
4-
static const WALLETCONNECT_MODAL_VERSION = '2.1.6';
4+
static const WALLETCONNECT_MODAL_VERSION = '2.1.7';
55

66
static const Key helpPageKey = Key('helpPageKey');
77
static const Key qrCodePageKey = Key('qrCodePageKey');

lib/models/walletconnect_modal_theme_data.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ class WalletConnectModalThemeData with _$WalletConnectModalThemeData {
7878
overlay010: Color.fromARGB(26, 0, 0, 0),
7979
overlay020: Color.fromARGB(51, 0, 0, 0),
8080
overlay030: Color.fromARGB(77, 0, 0, 0),
81+
// overlay002: Color.fromARGB(5, 255, 255, 255),
82+
// overlay005: Color.fromARGB(13, 255, 255, 255),
83+
// overlay010: Color.fromARGB(26, 255, 255, 255),
84+
// overlay020: Color.fromARGB(51, 255, 255, 255),
85+
// overlay030: Color.fromARGB(77, 255, 255, 255),
8186
foreground100: Color(0xFF141414),
8287
foreground200: Color(0xFF798686),
8388
foreground275: Color(0xFF95A0A0),

lib/services/explorer/explorer_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class ExplorerService implements IExplorerService {
133133
if (installed) {
134134
LoggerUtil.logger.v('Wallet ${item.name} installed: $installed');
135135
}
136+
136137
_walletListUnsorted.add(
137138
GridListItemModel<WalletData>(
138139
title: item.name,

lib/services/utils/url/url_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class UrlUtils extends IUrlUtils {
5656
if (p == PlatformExact.android) {
5757
return await androidAppCheck(uri);
5858
} else if (p == PlatformExact.iOS) {
59-
await canLaunchUrlFunc(
59+
return await canLaunchUrlFunc(
6060
Uri.parse(
6161
uri,
6262
),

lib/widgets/grid_list/grid_list.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class GridList<T> extends StatelessWidget {
2828
required this.createListItem,
2929
this.heightOverride,
3030
this.longBottomSheetHeightOverride,
31-
this.longBottomSheetAspectRatio = 0.73,
32-
this.itemAspectRatio = 0.85,
31+
this.longBottomSheetAspectRatio = 0.79,
32+
this.itemAspectRatio = 0.75,
3333
});
3434

3535
final GridListState state;
@@ -82,29 +82,32 @@ class GridList<T> extends StatelessWidget {
8282
return ValueListenableBuilder(
8383
valueListenable: provider.itemList,
8484
builder: (context, List<GridListItemModel<T>> value, child) {
85+
// Get the number of items to display, and the height of the grid list
8586
int itemCount;
8687
double height;
8788
switch (state) {
8889
case GridListState.short:
8990
itemCount = min(8, value.length);
90-
height = longBottomSheet ? 120 : (size.height * 0.3);
91+
height = longBottomSheet ? 140 : 280;
9192
break;
9293
case GridListState.long:
9394
itemCount = value.length;
94-
height = longBottomSheet ? 240 : (size.height * 0.6);
95+
height = longBottomSheet ? 200 : 560;
9596
break;
9697
case GridListState.extraShort:
9798
itemCount = min(4, value.length);
98-
height = 120;
99+
height = 140;
99100
break;
100101
}
101102

103+
// Handle overrides
102104
if (longBottomSheet && longBottomSheetHeightOverride != null) {
103105
height = longBottomSheetHeightOverride!;
104106
} else if (!longBottomSheet && heightOverride != null) {
105107
height = heightOverride!;
106108
}
107109

110+
// Handle keyboard visibility if we have an empty list
108111
if (value.isEmpty) {
109112
return KeyboardVisibilityBuilder(
110113
builder: (context, isKeyboardVisible) {
@@ -139,6 +142,8 @@ class GridList<T> extends StatelessWidget {
139142
itemCount: itemCount,
140143
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
141144
crossAxisCount: longBottomSheet ? 8 : 4,
145+
mainAxisSpacing: 8.0,
146+
crossAxisSpacing: 8.0,
142147
childAspectRatio: longBottomSheet
143148
? longBottomSheetAspectRatio
144149
: itemAspectRatio,

lib/widgets/grid_list/grid_list_item.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@ class GridListItem extends StatelessWidget {
1818
WalletConnectModalTheme.getData(context);
1919

2020
return Container(
21-
margin: const EdgeInsets.all(4),
21+
decoration: BoxDecoration(
22+
color: themeData.overlay010,
23+
borderRadius: BorderRadius.circular(8),
24+
),
2225
child: MaterialButton(
23-
padding: const EdgeInsets.all(4),
26+
padding: const EdgeInsets.all(8),
2427
onPressed: onSelect,
2528
shape: RoundedRectangleBorder(
2629
borderRadius: BorderRadius.circular(8),
2730
),
28-
focusColor: themeData.overlay020,
29-
hoverColor: themeData.overlay010,
31+
elevation: 1,
32+
focusElevation: 1,
33+
hoverElevation: 1,
34+
highlightElevation: 1,
3035
child: child,
3136
),
3237
);

lib/widgets/grid_list/grid_list_wallet_item.dart

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,19 @@ class GridListWalletItem extends StatelessWidget {
5252
color: themeData.foreground100,
5353
),
5454
),
55-
const SizedBox(height: 2.0),
56-
Text(
57-
listItem.description ?? '',
58-
textAlign: TextAlign.center,
59-
maxLines: 1,
60-
overflow: TextOverflow.clip,
61-
style: TextStyle(
62-
fontSize: 12.0,
63-
color: themeData.foreground300,
55+
if (listItem.description != null) ...[
56+
const SizedBox(height: 2.0),
57+
Text(
58+
listItem.description ?? '',
59+
textAlign: TextAlign.center,
60+
maxLines: 1,
61+
overflow: TextOverflow.clip,
62+
style: TextStyle(
63+
fontSize: 12.0,
64+
color: themeData.foreground300,
65+
),
6466
),
65-
),
67+
],
6668
],
6769
);
6870
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: walletconnect_modal_flutter
22
description: The WalletConnectModal for WalletConnect built using Flutter.
3-
version: 2.1.6
3+
version: 2.1.7
44
repository: https://github.com/WalletConnect/WalletConnectModalFlutter
55

66
environment:

0 commit comments

Comments
 (0)