mirror of
https://github.com/wownero/cyberwow.git
synced 2026-10-26 10:48:44 +01:00
add port to config
This commit is contained in:
@@ -31,5 +31,6 @@ const config = CryptoConfig
|
||||
70,
|
||||
Colors.green,
|
||||
Colors.black,
|
||||
34568,
|
||||
['--prune-blockchain'],
|
||||
);
|
||||
|
||||
@@ -28,6 +28,7 @@ class CryptoConfig {
|
||||
final int splashDelay;
|
||||
final Color textColor;
|
||||
final Color backgroundColor;
|
||||
final int port;
|
||||
final List<String> extraArgs;
|
||||
const CryptoConfig
|
||||
(
|
||||
@@ -37,6 +38,7 @@ class CryptoConfig {
|
||||
this.splashDelay,
|
||||
this.textColor,
|
||||
this.backgroundColor,
|
||||
this.port,
|
||||
this.extraArgs,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,15 +25,10 @@ import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
Future<http.Response> rpc(String method) async {
|
||||
var url = '';
|
||||
if (kReleaseMode) {
|
||||
url = 'http://127.0.0.1:34568/json_rpc';
|
||||
} else {
|
||||
url = 'http://192.168.10.101:34568/json_rpc';
|
||||
}
|
||||
import '../config.dart';
|
||||
|
||||
url = 'http://127.0.0.1:34568/json_rpc';
|
||||
Future<http.Response> rpc(String method) async {
|
||||
final url = 'http://127.0.0.1:${config.port}/json_rpc';
|
||||
|
||||
final body = json.encode
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user