Merge branch 'staging' into ui-testing

This commit is contained in:
julian 2022-09-08 10:56:36 -06:00
commit 94e6016f0a

View file

@ -731,7 +731,7 @@ Future<void> _setTestnetWrapper(bool isTestnet) async {
// setTestnet(isTestnet); // setTestnet(isTestnet);
} }
Future<bool> getAnonymity(int groupID) async { Future<dynamic> getAnonymity(int groupID) async {
Logging.instance.log("getAnonymity", level: LogLevel.Info); Logging.instance.log("getAnonymity", level: LogLevel.Info);
final Client client = Client(); final Client client = Client();
try { try {
@ -743,7 +743,7 @@ Future<bool> getAnonymity(int groupID) async {
body: jsonEncode({ body: jsonEncode({
"jsonrpc": "2.0", "jsonrpc": "2.0",
"id": "0", "id": "0",
'index': groupID, 'aset': groupID.toString(),
}), }),
); );
@ -753,7 +753,10 @@ Future<bool> getAnonymity(int groupID) async {
Logging.instance.log(anonSetResult.body.toString(), level: LogLevel.Info); Logging.instance.log(anonSetResult.body.toString(), level: LogLevel.Info);
final response = jsonDecode(anonSetResult.body.toString()); final response = jsonDecode(anonSetResult.body.toString());
if (response['status'] == 'success') { if (response['status'] == 'success') {
return true; final anonResponse = jsonDecode(response['result'] as String);
Logging.instance.log(anonResponse, level: LogLevel.Info);
return response;
} else { } else {
return false; return false;
} }