Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fanngyuan committed Dec 28, 2020
1 parent 295c832 commit 43d67e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/pages/node_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
var onclick;
if (!startRequest) {
onclick = () async {
// 用Directory.current 也不对
var command = "";
if (Platform.isMacOS) {
final current = await DirectoryService.getCurrentDirectory();
Expand All @@ -97,6 +96,7 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
"proxima",
"--http-apis",
"all",
"--disable-ipc-rpc",
//"--disable-mint-empty-block",
//"false"
],
Expand Down Expand Up @@ -469,8 +469,14 @@ class _NodePageState extends State<NodePage> with TickerProviderStateMixin {
savePrivateKey() async {
final node = Node(LOCALURL);
final account = await node.defaultAccount();
if (account == null) {
return;
}
final List exportedAccount =
await node.exportAccount(account['address'], "");
if (exportedAccount == null) {
return;
}
final String hexPrivatekey =
"0x" + HEX.encode(exportedAccount.map((e) => e as int).toList());

Expand Down

0 comments on commit 43d67e5

Please sign in to comment.