Skip to content

Commit 06fa82a

Browse files
author
Sterling Long
committed
1.2.4
1 parent 47e09fa commit 06fa82a

6 files changed

Lines changed: 35 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.2.4
2+
3+
- Added small size constraint back to WalletConnectModalConnect button
4+
- Added `sessionTopic` to launch wallet so that MetaMask will redirect back to dApp
5+
16
## 1.2.3
27

38
- Removed size constraints on WalletConnectModalConnect button

example/sign/lib/pages/sign_page.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,12 @@ class SignPageState extends State<SignPage>
305305
),
306306
_buildTestnetSwitch(),
307307
...chainButtons,
308-
WalletConnectModalConnect(
309-
service: _walletConnectModalService!,
310-
buttonRadius: 20,
308+
Container(
309+
constraints: const BoxConstraints(minHeight: 100),
310+
child: WalletConnectModalConnect(
311+
service: _walletConnectModalService!,
312+
buttonRadius: 20,
313+
),
311314
),
312315
],
313316
);

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 = '1.2.3';
4+
static const WALLETCONNECT_MODAL_VERSION = '1.2.4';
55

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

lib/services/walletconnect_modal/walletconnect_modal_service.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,12 @@ class WalletConnectModalService extends ChangeNotifier
285285
coreUtils.instance.createPlainUrl(redirect.universal ?? '');
286286

287287
await urlUtils.instance.launchRedirect(
288-
nativeUri: Uri.parse(nativeUrl),
289-
universalUri: Uri.parse(universalUrl),
288+
nativeUri: Uri.parse(
289+
'${nativeUrl}wc?sessionTopic=${_session!.topic}',
290+
),
291+
universalUri: Uri.parse(
292+
'${universalUrl}wc?sessionTopic=${_session!.topic}',
293+
),
290294
);
291295
}
292296
}

lib/widgets/walletconnect_modal_connect.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ class _WalletConnectModalConnectState extends State<WalletConnectModalConnect> {
5353

5454
@override
5555
Widget build(BuildContext context) {
56+
return Container(
57+
constraints: const BoxConstraints(minHeight: 40),
58+
child: _buildButton(context),
59+
);
60+
}
61+
62+
Widget _buildButton(BuildContext context) {
5663
final WalletConnectModalThemeData themeData =
5764
WalletConnectModalTheme.getData(context);
5865

@@ -109,8 +116,15 @@ class _WalletConnectModalConnectState extends State<WalletConnectModalConnect> {
109116
mainAxisAlignment: MainAxisAlignment.center,
110117
mainAxisSize: MainAxisSize.min,
111118
children: [
112-
CircularProgressIndicator(
113-
color: themeData.primary100,
119+
SizedBox(
120+
width: 25,
121+
height: 25,
122+
child: Center(
123+
child: CircularProgressIndicator(
124+
color: themeData.primary100,
125+
strokeWidth: 4,
126+
),
127+
),
114128
),
115129
const SizedBox(width: 8.0),
116130
Text(

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: 1.2.3
3+
version: 1.2.4
44
repository: https://github.com/WalletConnect/WalletConnectModalFlutter
55

66
environment:

0 commit comments

Comments
 (0)