Recommended Posts

Bug Report: Duplicate ID and Name Attributes in OpenHive Wallet Website

5 comments

louis8818.1 K6 months agoPeakD2 min read

https://files.peakd.com/file/peakd-hive/louis88/23tHbP3hF6m4T8w3UzsTYtRFisddpdGyiQ8DePCjpQiK2T4uDGBUYHejRodLf3ccy3S7J.gif

There is a bug on the OpenHive Wallet website where the checkboxes for "Received from" and "Transfer to" under the "Filter By User" section have the same id and name attributes as the previous checkboxes in the "Transactions" section.

Code Snippet
https://github.com/openhive-network/wallet/blob/e3df8781eb22fe14404ec896cd45644f155f1f99/src/app/components/elements/Filters/index.jsx

<div className="column small-4">
    <p>Filter By User</p>
    <div>
        <input
            onChange={handleFromUser}
            type="checkbox"
            id="outgoing"
            name="outgoing"
        />
        <label htmlFor="outgoing">
            Received from
        </label>
    </div>
    <div>
        <input
            onChange={handleToUser}
            type="checkbox"
            id="outgoing"
            name="outgoing"
        />
        <label htmlFor="outgoing">
            Transfer to
        </label>
    </div>
</div>

Problem:
The id and name attributes for "Received from" and "Transfer to" checkboxes are both set to outgoing, which conflicts with the id and name of the outgoing checkbox in the "Transactions" section. This can lead to incorrect form behavior and UI issues.

Solution:
Assign unique id and name attributes to each checkbox to avoid conflicts.

Example Fix:

<div className="column small-4">
    <p>Filter By User</p>
    <div>
        <input
            onChange={handleFromUser}
            type="checkbox"
            id="receivedFrom"
            name="receivedFrom"
        />
        <label htmlFor="receivedFrom">
            Received from
        </label>
    </div>
    <div>
        <input
            onChange={handleToUser}
            type="checkbox"
            id="transferTo"
            name="transferTo"
        />
        <label htmlFor="transferTo">
            Transfer to
        </label>
    </div>
</div>

https://files.peakd.com/file/peakd-hive/louis88/Eo8ZfTUaaKPemc8jRk6FB3rfe5DtPqRYwcVtJiazhH5oZ3yVdMPY4qV2kEhTRsnNcuk.png



https://files.peakd.com/file/peakd-hive/louis88/23v4Zbq5TQyn3aFGQ7YcUyQJQCHhh556WQfTgmeR6EtVe1RWUURNc89oCX25ZFnUHAXww.png

Vote for my Hive Witness

U can vote for my Witness using Hive Keychain here: https://vote.hive.uno/@louis.witness

https://files.peakd.com/file/peakd-hive/louis88/24241zs2F4mEKWwVa9y2CkqHjUcR7Rh2EyRQEXZA5vfHdjEMnq8Ej8R4cWxT1jgAtXQHP.png

Vote for my Hive Engine Witness

Vote for my Witness on Hive-Engine using Primersion Tool: https://primersion.com/he-witnesses Enter your Username and search for louis.witness

Comments

Sort byBest
AI
Waivio AI Assistant
How can I help you today?