Redundant Ordinal Numbers in Wallet Recovery Phrase #19813
Labels
bug
feature/web3/wallet
Integrating Ethereum+ wallet support
OS/Desktop
priority/P2
A bad problem. We might uplift this to the next planned release.
QA/No
release-notes/include
Milestone
Description
As reported by a user, the Brave Wallet recovery phrase is displayed with redundant ordinal numbers at times (when a word appears more than once in the phrase).
Steps to Reproduce
Actual result:
Note redundant ordinal numbers.
Expected result:
Ordinal numbers should not be duplicated.
Reproduces how often:
Easily.
Brave version (info found on brave://version)
1.34.41
Version/Channel Information:
Miscellaneous Information:
The problem is with the manner in which the ordinal number is determined. We currently look-up the word in the recovery phrase, and use the returned index to determine the ordinal number. This approach will always return the index of the first instance of the word.
Since we're using
recoveryPhrase.map
here, we could use the map'sindex
value instead:Alternatively, another approach would be to use an HTML ordered list (
<ol>
) and avoid manual-construction of indexes altogether.The text was updated successfully, but these errors were encountered: