Discover multisig flow#506
Conversation
|
Looks good I would suggest to show the human checkphrase on all multisigs, so we can easily distinguish them, talk about them etc |
…us-Network/quantus-apps into beast/discover-multisig-flow
|
I've reviewed the full diff plus the surrounding code on the PR branch. Here's my assessment. OverallSolid PR that cleanly swaps the multisig discovery stub for a real GraphQL-backed flow, removes the now-dead "add from address" path, wires logout cleanup, and adds good unit-test coverage for the mapping/query-building helpers. The localization, menu entry, and provider changes all hang together and there are no leftover references to the removed symbols ( A few things worth addressing before merge: High priority — checksum can render against the wrong rowIn itemBuilder: (context, index) {
final account = sorted[index];
return _DiscoverMultisigRow(account: account, ...); // no key
}
Fix is a one-liner — give the row a stable identity: return _DiscoverMultisigRow(
key: ValueKey(account.accountId),
account: account,
...
);(Alternatively handle Medium — DRY: duplicated GraphQL request/error plumbing
Future<Map<String, dynamic>?> _postGraphQl({required String query, Map<String, dynamic>? variables}) async {
final body = {'query': query, if (variables != null) 'variables': variables};
final response = await _graphQlEndpointService.post(body: jsonEncode(body));
if (response.statusCode != 200) {
throw Exception('GraphQL request failed with status: ${response.statusCode}. Body: ${response.body}');
}
final responseBody = jsonDecode(response.body) as Map<String, dynamic>;
if (responseBody['errors'] != null) {
throw Exception('GraphQL errors: ${responseBody['errors']}');
}
return responseBody['data'] as Map<String, dynamic>?;
}Heads up: this exact pattern is also duplicated in Medium — silent fallbacks vs. "fail early"In final signers = signersRaw is List ? signersRaw.map((e) => e.toString()).toList() : <String>[];
final rawThreshold = record['threshold'] as int?;
final threshold = rawThreshold != null && rawThreshold >= 1 ? rawThreshold : 1;Per the fail-early rule, malformed indexer records (missing/empty Relatedly, Low — GraphQL value interpolation vs. variables
Minor / nits
I have not posted anything to GitHub. Want me to drop this in as a PR review comment, or apply the high-priority |

Summary
Screenshots