joinmarket-webui / joinmarket-webui/jam

refactor: prepare enabled state for individual operations

Open
#1,388 0 comments 0 reactions 0 assignees View on GitHub
refactoring SoB
Dominant language
TypeScript
Stars
330
Forks
122
Avg merge
2d 17h
Merged PRs (30d)
17

Description

Currently, all states infer their enabled state by themself, e.g. by checking if maker/taker/rescan is active.
This responsibility should be moved into a context. e.g.
```json
{
"receive": {
"enabled": true,
"reasons": [],
[...]
},
"earn": {
"enabled": false,
"reasons": [{
"title": "Rescan in progress",
"description": "...",
}]
},
"send": {
"enabled": false,
"reasons": [{
"title": "Earn in progress",
"description": "...",
}]
}
[...]
}
```

(Just a concept, structure can be adapted to actual needs)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the states that currently infer enabled status from maker, taker, or rescan activity, then inspect the existing context structure. The work is complete when individual operations expose enabled status and reasons through a shared context, with the exact structure adapted to the project's needs.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.