Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set autoConnet() expiry time #307

Merged
merged 7 commits into from
Oct 7, 2024

Conversation

Iwueseiter
Copy link
Contributor

Set autoConnet() expiry time

Fixes #280

Types of change

  • Feature
  • Bug
  • Enhancement

Comments (optional)

@Nadai2010
Copy link
Contributor

Hi, sound good.

It is set to a defined time before reconnecting with useAutoConnect, the TLL is set to 60 sg in milliseconds 60000, the correct setLastConnectionTime is stored in local storage, I did not find any U/X failures of wallet disconnection or failures to interact after timeout.

@Iwueseiter should check the format of the changes to ensure they comply with the rules, run yarn format to fix job failures in CI and @metalboyrick or @jrcarlos2000 check code and final version

@metalboyrick metalboyrick self-requested a review October 4, 2024 02:44
Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep CI green !

@Nadai2010
Copy link
Contributor

Hi @Iwueseiter , remember that today is the last day of the ODHack, you just need toead comments, Only run the tests so that the CI Jobs is ok

@Iwueseiter
Copy link
Contributor Author

Noted

@Iwueseiter
Copy link
Contributor Author

Iwueseiter commented Oct 5, 2024

@metalboyrick I’ve ran all the formatting commands, but it’s still failing. I noticed Prettier wasn’t included in the dependencies, so I had to install it. Also, what formatting style is the CI expecting? There’s no .prettierrc configuration file in the codebase.

@metalboyrick
Copy link
Collaborator

metalboyrick commented Oct 5, 2024

We use the default NextJS core vitals for linting.

You can try running yarn format from the topmost directory (this repo's root directory),

If that does not work I've checked for you what the formatter expects, It expected double quotes instead of single quotes for the strings.

You can ping us in the telegram group ASAP should you run into further troubles, I have the same handle.

Thank you!

Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments and you're good!

const [_, setLastConnector] = useLocalStorage<{ id: string; ix?: number }>(
"lastUsedConnector",
{ id: "" },
{
initializeWithValue: false,
},
);
const [, setLastConnectionTime] = useLocalStorage<number>(
"lastConnectionTime",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly extract this "lastConnectionTime" to a constant, thank you!

@Iwueseiter
Copy link
Contributor Author

@metalboyrick please review.

@Nadai2010
Copy link
Contributor

Hi @Iwueseiter, Thanks a lot for your

All changes updated, and lastConnectionTime has been migrated as const to scaffold.config modularity, maintainability, clarity...

Approved for me, need review by @metalboyrick

packages/nextjs/scaffold.config.ts Outdated Show resolved Hide resolved
@Iwueseiter
Copy link
Contributor Author

@metalboyrick kindly review. Thank you

@metalboyrick metalboyrick self-requested a review October 7, 2024 11:52
Copy link
Collaborator

@metalboyrick metalboyrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, all good! thanks for the hard work!

@metalboyrick metalboyrick merged commit e37b20f into Scaffold-Stark:main Oct 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CHORE] Set expiry time to useAutoConnect()
3 participants