joejordan

joejordan

Software Developer, technologist, decentralization advocate, political hobbyist and all-around nice guy.

Member Since 10 years ago

Tampa Bay, Florida

Experience Points
9
follower
Lessons Completed
31
follow
Lessons Completed
358
stars
Best Reply Awards
16
repos

8 contributions in the last year

Pinned
⚡ 💣DaBomb URL Shortener
⚡ add the feature of tcp proxy with nginx, with health check and status monitor
⚡ Legacy project where I overcame a number of obstacles in creating an efficient method of communicating across the Windows user boundary using semaphores in VB6.
⚡ The Sunlight Foundation's Congress API.
⚡ OpenZeppelin, a framework to build secure smart contracts on Ethereum
⚡ The Ethereum Improvement Proposal repository
Activity
Dec
6
1 day ago
started
started time in 19 hours ago
Nov
24
1 week ago
Activity icon
issue

joejordan issue comment MetaMask/metamask-extension

joejordan
joejordan

Metamask Extension can not change network to localhost (Version 10.6.0)

Describe the bug Metamask Extension can not change network to localhost (Version 10.6.0)

Steps to reproduce (REQUIRED)

  1. Open metamask and try to change network to localhost:8545

Expected behavior I should be able to change network to localhost. It was working with the old versions (ex. version 10.5.2)

Screenshots image image

Browser details (please complete the following information):

  • OS: OSX
  • Browser: Chrome Version 96.0.4664.55 (Official Build) (x86_64)
  • MetaMask Version: Version 10.6.0

Additional context (Error Messages, etc.) AssertionError: Unknown Infura provider type "localhost".

joejordan
joejordan

I have also experienced this issue on a fresh version of Chrome and installing MetaMask from the store (v10.6.1). I installed version 10.6.2 manually and the localhost network option began working again.

Looks like it was fixed in this PR: https://github.com/MetaMask/metamask-extension/pull/12786

Nov
12
3 weeks ago
Nov
3
1 month ago
started
started time in 1 month ago
Oct
6
2 months ago
Activity icon
issue

joejordan issue comment react-boilerplate/redux-injectors

joejordan
joejordan

React 16.13 throws a warning when "nesting" useInjectReducer calls

After upgrading to React 16.13, we started getting this warning in many places:

image

More info about it in the 16.13 announcement post.

Here's how it happens in our case:

  • Have ParentContainer with useInjectReducer
  • Have ChildContainer with useInjectReducer
  • When ChildContainer's useInjectReducer is called, the warning appears.

This happens because calling useInjectReducer calls store.replaceReducer synchronously during the render of the ChildContainer.

From what I understand, we're not technically updating the state of a component during the render of another component but we are updating the ReactReduxContext - which contains the store and is also consumed by ParentContainer via useStore inside useInjectReducer - so that must be enough to trigger the warning.

The suggestion by the React team is to "wrap the setState call into useEffect".

Up until September of last year, this is exactly how useInjectReducer worked: injection happened inside an effect. However, doing the injection inside an effect caused a different issue: we couldn't guarantee that the reducer or saga was always injected before a relevant action is dispatched. (Discussed in RBP here.)

Does anyone have any thoughts or suggestions regarding how we could fix this?

joejordan
joejordan

@BenLorantfy I attempted migrating our (rather large) frontend project to the 2.0.0-rc release. Unfortunately it looks like some of the patterns we were using are no longer working. For example, every feature page is set up with a "loader" type of component that makes the network calls and checks for any errors on them before rendering the feature page with the retrieved data. At the top of these loader components, we typically inject our reducers and sagas here, and then attempt to extract from them via a useSelector after.

function FeatureAppLoader(props) {
  useInjectReducer({ key, reducer });
  useInjectSaga({ key, saga });
  const isLoaded = useSelector(({ featureApp }) => featureApp?.isLoaded);
...

Currently I get an undefined error from useSelector on the first pass-through. Is there any way to retain the original functionality where the defaults on the reducer are immediately available upon injection?

started
started time in 2 months ago
Sep
29
2 months ago
Activity icon
issue

joejordan issue comment react-boilerplate/redux-injectors

joejordan
joejordan
joejordan
joejordan

Are there any additional holds in getting this merged? Tried running npm install https://github.com/react-boilerplate/redux-injectors#dev to get a jump on the improvements but it didn't appear to be fully baked, as it was unable to resolve the package.

Sep
28
2 months ago
started
started time in 2 months ago
Sep
21
2 months ago