Skip to content

Commit

Permalink
fix getRuntimeModuleName return value
Browse files Browse the repository at this point in the history
  • Loading branch information
RomeroYang committed Jun 23, 2021
1 parent edde4d7 commit eb1b069
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.2.2] - 20210623.

* bump polkawallet_sdk & ui: 0.2.2.
* fix council.vote action for multi-runtimes.

## [0.2.1] - 20210609.

* update dependency polkawallet_sdk: 0.2.1.
Expand Down
5 changes: 3 additions & 2 deletions lib/service/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class PluginApi {
}

Future<String> getRuntimeModuleName(List<String> modules) async {
final res = await Future.wait(
modules.map((e) => plugin.sdk.webView.evalJavascript('api.tx.$e')));
final res = await Future.wait(modules.map((e) =>
plugin.sdk.webView.evalJavascript('(api.tx.$e != undefined ? {} : null)', wrapPromise: false)));
print(res);
return modules[res.indexWhere((e) => e != null)];
}
}
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: polkawallet_plugin_kusama
description: The kusama/polkadot network flutter plugin for polkawallet app.
version: 0.2.1
version: 0.2.2
homepage:

environment:
Expand All @@ -18,11 +18,11 @@ dependencies:
flutter_svg: ^0.22.0
get_storage: ^2.0.2
json_annotation: ^4.0.1
polkawallet_sdk: ^0.1.8
polkawallet_sdk: ^0.2.2
polkawallet_ui:
git:
url: https://github.com/polkawallet-io/ui.git
ref: a181a240a0c2b098a2e4140e07d036ea8222cea1
ref: dee6fc6074f546e914c8794fd5e3a3e2b829b53c

dev_dependencies:
build_runner: ^2.0.3
Expand Down

0 comments on commit eb1b069

Please sign in to comment.