Skip to content

Commit 4cf9019

Browse files
author
Sterling Long
committed
height to button, example updated to include contract call
1 parent ae47c65 commit 4cf9019

13 files changed

Lines changed: 289 additions & 187 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.1.5
2+
3+
- Added height parameter to the `WalletConnectModalConnect` button
4+
15
## 2.1.4
26

37
- Grid list overhauled to allow for increased customization

example/sign/lib/home_page.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
import 'package:walletconnect_flutter_dapp/models/chain_metadata.dart';
33
import 'package:walletconnect_flutter_dapp/pages/wcm_page.dart';
4-
import 'package:walletconnect_flutter_dapp/utils/crypto/chain_data_wrapper.dart';
4+
import 'package:walletconnect_flutter_dapp/utils/crypto/chain_data.dart';
55
import 'package:walletconnect_flutter_dapp/utils/crypto/helpers.dart';
66
import 'package:walletconnect_flutter_dapp/utils/dart_defines.dart';
77
import 'package:walletconnect_flutter_dapp/utils/string_constants.dart';

example/sign/lib/pages/wcm_page.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'dart:async';
33
import 'package:flutter/material.dart';
44
import 'package:walletconnect_flutter_dapp/models/chain_metadata.dart';
55
import 'package:walletconnect_flutter_dapp/utils/constants.dart';
6-
import 'package:walletconnect_flutter_dapp/utils/crypto/chain_data_wrapper.dart';
6+
import 'package:walletconnect_flutter_dapp/utils/crypto/chain_data.dart';
77
import 'package:walletconnect_flutter_dapp/utils/crypto/helpers.dart';
88
import 'package:walletconnect_flutter_dapp/utils/string_constants.dart';
99
import 'package:walletconnect_flutter_dapp/widgets/chain_button.dart';
@@ -132,6 +132,11 @@ class _WCMPageState extends State<WCMPage> with SingleTickerProviderStateMixin {
132132
WalletConnectModalConnect(
133133
service: _walletConnectModalService!,
134134
),
135+
// WalletConnectModalConnect(
136+
// service: _walletConnectModalService!,
137+
// width: double.infinity,
138+
// height: 100,
139+
// ),
135140
Expanded(
136141
child: Container(
137142
padding: const EdgeInsets.all(8.0),
@@ -250,7 +255,7 @@ class _WCMPageState extends State<WCMPage> with SingleTickerProviderStateMixin {
250255
// Create the required namespaces
251256
requiredNamespaces[entry.key.name] = RequiredNamespace(
252257
chains: entry.value.toList(),
253-
methods: getChainMethods(entry.key),
258+
methods: getOptionalChainMethods(entry.key),
254259
events: getChainEvents(entry.key),
255260
);
256261
}
File renamed without changes.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
class ContractDetails {
2+
// Tether (USDT)
3+
static const contractAddress = '0xdac17f958d2ee523a2206206994597c13d831ec7';
4+
5+
// vitalik.eth
6+
static const balanceAddress = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
7+
8+
static const readContractAbi = [
9+
{
10+
'constant': true,
11+
'inputs': [],
12+
'name': 'name',
13+
'outputs': [
14+
{
15+
'name': '',
16+
'type': 'string',
17+
},
18+
],
19+
'payable': false,
20+
'stateMutability': 'view',
21+
'type': 'function',
22+
},
23+
{
24+
'constant': true,
25+
'inputs': [],
26+
'name': 'symbol',
27+
'outputs': [
28+
{
29+
'name': '',
30+
'type': 'string',
31+
},
32+
],
33+
'payable': false,
34+
'stateMutability': 'view',
35+
'type': 'function',
36+
},
37+
{
38+
'constant': true,
39+
'inputs': [],
40+
'name': 'totalSupply',
41+
'outputs': [
42+
{
43+
'name': '',
44+
'type': 'uint256',
45+
},
46+
],
47+
'payable': false,
48+
'stateMutability': 'view',
49+
'type': 'function',
50+
},
51+
{
52+
'constant': true,
53+
'inputs': [
54+
{
55+
'name': '_owner',
56+
'type': 'address',
57+
},
58+
],
59+
'name': 'balanceOf',
60+
'outputs': [
61+
{
62+
'name': 'balance',
63+
'type': 'uint256',
64+
},
65+
],
66+
'payable': false,
67+
'stateMutability': 'view',
68+
'type': 'function',
69+
},
70+
];
71+
72+
static const getFilterChangesAbi = [
73+
'event Transfer(address indexed from, address indexed to, uint amount)',
74+
];
75+
}

0 commit comments

Comments
 (0)