fix: a second click on Add while the lookup waits tracks the token once (closes #727)
The "already tracked" check ran only before the contract lookup, so a second click while the first lookup waited tracked the token twice. AddToken and SettingsAddToken now check again when the lookup answers. An answer for a token tracked meanwhile shows the "already tracked" flash message and tracks nothing. Model: opus-5-5
This commit was merged in pull request #728.
This commit is contained in:
@@ -163,6 +163,14 @@ function init(_ctx) {
|
||||
);
|
||||
return;
|
||||
}
|
||||
// Another click on Add, or a "Top tokens:" button, may have
|
||||
// tracked this token while this lookup waited.
|
||||
if (isTracked(addr)) {
|
||||
showFlash("Already tracked.");
|
||||
infoEl.textContent = "";
|
||||
infoEl.style.visibility = "hidden";
|
||||
return;
|
||||
}
|
||||
// The balance list never shows a token that the spoof rule
|
||||
// refuses, so such a token is not tracked. The rule never refuses
|
||||
// a bundled token, so the "Top tokens:" buttons and the top 100
|
||||
|
||||
Reference in New Issue
Block a user