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

Fix/disconnecting resets the shelf #184

Conversation

gabrieljolvm
Copy link
Contributor

Closes #160

now the shelves resets to the initial state when the user disconnects via sidebar menu.

Copy link

vercel bot commented Mar 5, 2024

@gabrieljolvm is attempting to deploy a commit to the Shared Blockful's projects Team on Vercel.

A member of the Team first needs to authorize it.

);
};
fetchApprove();
}, [nftAuthUser, allSelectedNftsApproved]);

Check warning

Code scanning / ESLint

verifies the list of dependencies for Hooks like useEffect and similar Warning

React Hook useEffect has missing dependencies: 'setAllSelectedNftsAreApproved' and 'setAuthedUserNftsApprovalStatus'. Either include them or remove the dependency array.
validateAddressToSwap: (
_authedUser: EthereumAddress,
_inputEnsAddress: string | null | undefined
_inputEnsAddress: string | null | undefined,

Check failure

Code scanning / ESLint

Disallow unused variables Error

'_inputEnsAddress' is defined but never used.
@@ -41,6 +59,14 @@
nftInputUser: [],
destinyChain: SupportedNetworks.SEPOLIA,
setDestinyChain: () => {},
setTimeDate: () => {},

Check failure

Code scanning / ESLint

Disallow empty functions Error

Unexpected empty method 'setTimeDate'.
@@ -41,6 +59,14 @@
nftInputUser: [],
destinyChain: SupportedNetworks.SEPOLIA,
setDestinyChain: () => {},
setTimeDate: () => {},
timeDate: BigInt(1),
setAllSelectedNftsAreApproved: () => {},

Check failure

Code scanning / ESLint

Disallow empty functions Error

Unexpected empty method 'setAllSelectedNftsAreApproved'.
timeDate: BigInt(1),
setAllSelectedNftsAreApproved: () => {},
allSelectedNftsApproved: false,
setAuthedUserNftsApprovalStatus: () => {},

Check failure

Code scanning / ESLint

Disallow empty functions Error

Unexpected empty method 'setAuthedUserNftsApprovalStatus'.
);
};
fetchApprove();
}, [nftAuthUser, allSelectedNftsApproved]);

Check warning

Code scanning / ESLint

verifies the list of dependencies for Hooks like useEffect and similar Warning

React Hook useEffect has missing dependencies: 'setAllSelectedNftsAreApproved', 'setAuthedUserNftsApprovalStatus', and 'updateSwapStep'. Either include them or remove the dependency array.
@@ -0,0 +1,46 @@
/* eslint-disable @typescript-eslint/no-var-requires */
require("dotenv").config();

Check failure

Code scanning / ESLint

Disallow `require` statements except in import statements Error

Require statement not part of import statement.
getUserAddress();
}, 750);
return () => clearTimeout(requestDelay);
}, [inputAddress]);

Check warning

Code scanning / ESLint

verifies the list of dependencies for Hooks like useEffect and similar Warning

React Hook useEffect has missing dependencies: 'getUserAddress', 'setUserJustValidatedInput', and 'setValidatedAddressToSwap'. Either include them or remove the dependency array.
}

export const SwapContext = React.createContext<SwapContextProps>({
inputAddress: "",
validatedAddressToSwap: "",
setValidatedAddressToSwap: () => {},

Check failure

Code scanning / ESLint

Disallow empty functions Error

Unexpected empty method 'setValidatedAddressToSwap'.
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [validatedAddressToSwap]);

Check warning

Code scanning / ESLint

verifies the list of dependencies for Hooks like useEffect and similar Warning

React Hook useEffect has missing dependencies: 'inputAddress' and 'userJustValidatedInput'. Either include them or remove the dependency array.
@gabrieljolvm gabrieljolvm changed the base branch from main to develop March 5, 2024 12:26
@heronlancellot
Copy link
Member

hey yo @gabrieljolvm !
The actual steps are reproducing the same error.
It hasn't worked yet 👀
image

@gabrieljolvm
Copy link
Contributor Author

gabrieljolvm commented Mar 5, 2024

@heronlancellot sorry, it's fixed now.

Copy link
Contributor

@eduramme eduramme left a comment

Choose a reason for hiding this comment

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

NIce!

@0xneves
Copy link
Contributor

0xneves commented Mar 20, 2024

This resolutions was pre-merge and might not fix the issue. Look into #222 first to see if closes this issues!

Copy link
Contributor

@0xneves 0xneves left a comment

Choose a reason for hiding this comment

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

The current code is actually just removing the NFTs from the shelf but it's leaving a blank space in the entire shelf struct

image

Also the branch must be update to the most recent version of develop

@0xneves
Copy link
Contributor

0xneves commented Mar 21, 2024

Closed by #222

@0xneves 0xneves closed this Mar 21, 2024
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.

fix: disconnecting via the sidebar is not reseting the shelf
5 participants