Unify pool configuration flows#218
Conversation
2f0e611 to
f5b4bd8
Compare
f5b4bd8 to
240679c
Compare
|
@pavlenex really learned from it ... |
lucasbalieiro
left a comment
There was a problem hiding this comment.
I first of all thank you guys. Seems like a nice and structured improvement.
I've did the fist round of reading the important code changes here. I'm gonna take a time now to do some testing locally
|
Thank you so much @lucasbalieiro! We depend on your reviews 🫂 |
|
If you select multiple pools, set the SRI as primary and donate 100% the UI loses the information of the payout address that it asked and make me type the address for each one again. that is expected because the UI is cleaning the address if you give 100% to SRI pool. but seems that a UI improvement could be preserving this data and apply to the pools that does not support our user_identity features of donation. Screen.Recording.2026-07-20.at.15.19.41.mov |
|
when setting the donation to 100%, I can only go back to 0% or 100%, no mid value Screen.Recording.2026-07-20.at.15.31.09.mov |
|
in
if (donationPercent >= 100) {
return worker ? `sri/donate/${worker}` : 'sri/donate';
// address gets dropped
}So when the user enter their address and sets donation to 100, the identity becomes just "sri/donate". Their entered address is dropped. So even after user sets back the donation to any range it gets called with empty address and had to enter the address again. The slider only fixed to 0 and 100 is the consequence of it. we can fix it modifying this export function buildSriIdentity(address: string, workerName: string, donationPercent: number): string {
const addr = address.trim();
const worker = workerName.trim();
if (donationPercent >= 100) {
if (!addr && !worker) return 'sri/donate';
if (!addr) return `sri/donate/${worker}`;
return worker
? `sri/donate/100/${addr}/${worker}`
: `sri/donate/100/${addr}`;
}This is after the fix :- Screen.Recording.2026-07-21.012737.mp4on 100, user cannot continue , It says it should be b/w 0-99 |
|
Note :- This bug is not created in this PR, they were present already in the file but they were not exposed |
0f16db4 to
b44fe34
Compare
|
@lucasbalieiro another nice catch, fixed via Screen.Recording.2026-07-21.at.10.29.59.mov |
lucasbalieiro
left a comment
There was a problem hiding this comment.
tACK looks very nice.
My concerned with loop useEffect was addressed when the useRef was addded in b44fe34
confirmed that the pool priority on the config file is correctly ordered after this refactor:
confirmed that after a modifying the pools list inside the dashboard settings, the changes are applied correctly after tis refactor
Co-Authored-By: Lucas Balieiro <37416577+lucasbalieiro@users.noreply.github.com>
b44fe34 to
d84ef24
Compare
|
Thanks for review @lucasbalieiro I've just resolved conflicts introduced when we merged #219. I think this one should be good to go. Needs final approval. |
lucasbalieiro
left a comment
There was a problem hiding this comment.
Did a quick check on the main points after the rebase and LGTM
This PR replaced the three separate custom-pool workflows from PR #217 with one shared pool configuration flow used by both Setup and Settings. Users can now add, remove, and reorder primary and fallback pools in the same interface. The primary payout address or username is entered once, while fallback pools inherit it automatically unless the user explicitly chooses to customize them.
This is better because there is now one consistent behavior to understand, test, and maintain instead of several implementations that could drift apart. It also reduces repetitive forms and excessive scrolling, preserves custom fallback identities safely, and validates pool configuration on both the client and server before saving.
I based it on #217 to preserve commit history and credit the author for the effort that inspired a more complex refactor. There's a lot here so no need to prio review, but whenever you get a chance @lucasbalieiro I'd appreciate if you have a better idea on how to architect this.
Screen.Recording.2026-07-17.at.14.55.02.mov