Enhance TFChain Service
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- dart
- Domain
- networking
Research direction
No files or tests are named. Start by locating the TFChain service and the getProposals entry point, then review how QueryClient instances and network operations are handled across its functions. Done means connections are reused or pooled and network calls have appropriate timeouts and error handling.
Written by the indexing model from the issue text.
Description
- Every function creates new client connections without pooling or reuse
- Network calls can hang indefinitely, causing app freezes
- Add .timeout() to all network operations
Future<Map<String, List<Proposal>>> getProposals() async {
final chainUrl = Globals().chainUrl;
final client = TFChain.QueryClient(chainUrl);
try {
await client.connect().timeout(Duration(seconds: 30));
final proposals = await client.dao.get().timeout(Duration(seconds: 15));
return proposals;
} on TimeoutException {
throw Exception('Request timed out while getting DAO proposals');
} on SocketException {
throw Exception('Network error while getting DAO proposals');
} catch (e) {
throw Exception('Failed to get DAO proposals: ${e.toString()}');
}
}
- Dominant language
- Dart
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from threefoldtech/grid_connect
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
threefoldtech/grid_connect#1246 · 1 comment ·
-
TF Connect Wallet section Remains Accessible Without Password After Screen Unlock – Security Issue Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
threefoldtech/grid_connect#1227 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
threefoldtech/grid_connect#1213 ·
-
threefoldtech/grid_connect#1197 · 1 assignee ·
-
threefoldtech/grid_connect#1193 · 1 assignee ·
All issues in threefoldtech/grid_connect
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bus
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100