Skip to content

Commit

Permalink
enhancements and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Feb 1, 2024
1 parent b60f048 commit 5f7e582
Show file tree
Hide file tree
Showing 15 changed files with 435 additions and 304 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.0-beta01

- Added Smart Contract interactions to SignEngine

## 2.1.14

- Minor improvements
Expand Down
8 changes: 4 additions & 4 deletions example/dapp/lib/utils/crypto/eip155.dart
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,19 @@ class EIP155 {
}) async {
final results = await Future.wait([
// results[0]
web3App.readContractCall(
web3App.requestReadContract(
deployedContract: contract,
functionName: 'name',
rpcUrl: rpcUrl,
),
// results[1]
web3App.readContractCall(
web3App.requestReadContract(
deployedContract: contract,
functionName: 'totalSupply',
rpcUrl: rpcUrl,
),
// results[2]
web3App.readContractCall(
web3App.requestReadContract(
deployedContract: contract,
functionName: 'balanceOf',
rpcUrl: rpcUrl,
Expand Down Expand Up @@ -288,7 +288,7 @@ class EIP155 {
required DeployedContract contract,
required Transaction transaction,
}) async {
return await web3App.writeContractCall(
return await web3App.requestWriteContract(
topic: topic,
chainId: chainId,
rpcUrl: rpcUrl,
Expand Down
9 changes: 6 additions & 3 deletions example/dapp/lib/widgets/method_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ class MethodDialogState extends State<MethodDialog> {
content: FutureBuilder<dynamic>(
future: widget.response,
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
debugPrint('snapshot: $snapshot');
if (snapshot.hasData) {
final String t = jsonEncode(snapshot.data);
dynamic data = snapshot.data;
if (snapshot.data is String) {
data = jsonDecode(snapshot.data);
}
final String t = jsonEncode(data);
return InkWell(
onTap: () {
Clipboard.setData(ClipboardData(text: t)).then(
Expand Down Expand Up @@ -77,7 +80,7 @@ class MethodDialogState extends State<MethodDialog> {
return const SizedBox(
width: StyleConstants.linear48,
height: StyleConstants.linear48,
child: CircularProgressIndicator(),
child: Center(child: CircularProgressIndicator()),
);
}
},
Expand Down
Loading

0 comments on commit 5f7e582

Please sign in to comment.