Closed metalboyrick closed 1 month ago
I am applying to this issue via OnlyDust platform.
Hi @metalboyrick can I work on this? I'm a frontend and smart contract developer. I've contributed to Projects here on onlydust and with that experience, I would handle this task as expected. This would also be my first time contributing to this project.
Hey @Iwueseiter! Thanks for showing interest. We've created an application for you to contribute to Speedrun & Scaffold Stark. Go check it out on OnlyDust!
I am applying to this issue via OnlyDust platform.
I am a frontend and blockchain developer ,i am interested in contributing to this issue with 2 years experience , kindly assign i am ready to work please
Here is how i intend to approach the problem below:
Hey @ShantelPeters! Thanks for showing interest. We've created an application for you to contribute to Speedrun & Scaffold Stark. Go check it out on OnlyDust!
Hello everyone, @Iwueseiter @ShantelPeters the Issues for the OD Hack will be assigned to each of you at the start, prepare your skills.
I am applying to this issue via OnlyDust platform.
My name is Collins Ikechukwu. I'm a full stack blockchain developer developer.
To implement an ### Steps to Implement Expiry Time in useAutoConnect()
Store Last Connection Time:
useAutoConnect()
hook to store the last intentional connection time. This should be set whenever the user connects via the connect button.Extract TTL Duration:
scaffold.config.ts
for the desired TTL duration (in milliseconds).Implement Expiry Logic:
useAutoConnect()
hook, check if the current time exceeds the last connection time plus the TTL duration before attempting to reconnect.User Experience Consideration:
Testing:
Documentation:
useAutoConnect()
behavior and configuration settings.I am applying to this issue via OnlyDust platform.
kindly assign me this issue as am a frontend developer with experience using frontend technologies
I recognize that useAutoConnect() currently attempts to reconnect indefinitely until I manually log out, which raises security concerns. Implement a Connection Expiry:
I will find a way to store the timestamp of the last intentional connection. This means I’ll track when I click the connect button, differentiating it from auto-connection attempts. Extract TTL Duration:
I will extract the desired time-to-live (TTL) duration and store it in scaffold.config.ts in milliseconds. This will allow me to easily adjust the expiry time as needed. Modify useAutoConnect():
I will implement changes to useAutoConnect() so that it checks the current time against the stored last connection time. If the TTL has expired, I will ensure that it does not attempt to reconnect. I will make sure that my implementation does not disconnect a wallet that has reconnected before the TTL expires, as I understand that this would result in a poor user experience. Test the Implementation:
After making these changes, I will thoroughly test the functionality to ensure that it behaves as expected, allowing reconnections within the TTL and preventing reconnections once the expiry time has passed.
I am applying to this issue via OnlyDust platform.
I have experience in React development and state management, with experience in building secure and user-friendly web applications
To tackle the issue, I would:
Store Connection Time: Implement a mechanism to store the last intentional connection timestamp when the user clicks the connect button.
Configure TTL: Extract the desired TTL duration into scaffold.config.ts in milliseconds for easy configuration.
Modify Logic: Update the useAutoConnect() hook to check the current time against the stored connection time. If the TTL has expired, prevent reconnection attempts while ensuring that already connected wallets remain active.
Testing: Thoroughly test the implementation to confirm that users experience seamless reconnections within the TTL and proper handling after expiry.
all yours @Iwueseiter
Hi @Iwueseiter, any updates on this issue?
Hi @Iwueseiter, any updates on this issue?
Yes I’ve been working on it and I’d create a PR today.
Issue Overview
Currently
useAutoConnect()
will try to reconnect you indefinitely until you log out yourself. We would prefer to have some expiry time to ensure security in the web app.Proposed Solutions or Ideas
scaffold.config.ts
in milliseconds.useAutoConnect()
in such a way that it does not allow reconnecting after the TTL has ended. Note please do not implement it in a way that it disconnects a reconnected wallet since it's bad UX