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: fixed sepolia for gated group condition #855

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ChatViewComponentTest = () => {
return (
<div>
<h2>Chat UI Test page</h2>
<CreateGroupModal onClose={()=>{console.log('in close')}} />
{/* <CreateGroupModal onClose={()=>{console.log('in close')}} /> */}
<ChatViewComponentCard>
{/* <CreateGroupModal onClose={()=>{console.log('in close')}} modalBackground={MODAL_BACKGROUND_TYPE.OVERLAY} modalPositionType={MODAL_POSITION_TYPE.RELATIVE}/> */}

Expand Down
2 changes: 1 addition & 1 deletion packages/examples/sdk-frontend-react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const checkForWeb3Data = ({

export function App() {
const { account, library, active, chainId } = useWeb3React();
const [env, setEnv] = useState<ENV>(ENV.PROD);
const [env, setEnv] = useState<ENV>(ENV.DEV);
const [isCAIP, setIsCAIP] = useState(false);
const [signer, setSigner] = useState();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const CriteriaSection = ({ criteria }: { criteria: ConditionData }) => {

const [tokenSymbol] = useTokenSymbolLoader(criteria);
return (
<Section gap="8px" width="100%">
<Section gap="8px" width="100%" justifyContent='start'>
<Span
alignSelf="center"
background={theme.backgroundColor?.criteriaLabelBackground}
Expand All @@ -129,7 +129,7 @@ const CriteriaSection = ({ criteria }: { criteria: ConditionData }) => {
</Span>
{criteria?.data?.['amount']} {tokenSymbol}
</Span>
<ChainIconSVG padding="0 6px 0 0" >
<ChainIconSVG padding="3px 6px 0 0" >
{
NETWORK_ICON_DETAILS[
criteria?.data?.['contract'].split(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,13 @@ export const MessageInput: React.FC<MessageInputProps> = ({
}, [chatId, pgpPrivateKey, account, env]);

useEffect(() => {
console.log('in useEffect')
console.log(chatFeed)
if (!account && !env && !chatId) return;
if (account && env && chatId && chatFeed && chatFeed?.groupInformation) {
setIsMember(checkIfMember(chatFeed, account));
setIsRules(checkIfAccessVerifiedGroup(chatFeed));
}
}, [chatId, chatFeed, account, env]);
console.log(isMember)
console.log(checkIfMember(chatFeed, account!))

const addEmoji = (emojiData: EmojiClickData, event: MouseEvent): void => {
setTypedMessage(typedMessage + emojiData.emoji);
setShowEmojis(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const createSVGIcon = (element:any, chainName: string) => {
};

export const NETWORK_ICON_DETAILS = {
5: {
label: 'ETHEREUM GOERLI',
icon: createSVGIcon(<EthereumSvg/>, 'Ethereum Goerli'),
11155111: {
label: 'ETHEREUM SEPOLIA',
icon: createSVGIcon(<EthereumSvg/>, 'Ethereum Sepolia'),
},
1: {
label: 'ETHEREUM MAINNET',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,11 @@ const validateTokenData = async (condition:Rule):Promise<CriteriaValidationError
if(_eip155Format.length !==3){
return {tokenError:"Invalid contract address"}
}

const [chainId, address] = [parseInt(_eip155Format[1]), _eip155Format[2]]

if(!ethers.utils.isAddress(address)){
return {tokenError:`Invalid contract address`}
}

const [err] = condition.category === CATEGORY.ERC721 ?
await fetchERC721nfo(address, chainId) : await fetchERC20Info(address, chainId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const getChainRPC = (chainId: number): string => {
return getRpcURL("optimism-mainnet", key);
case 56:
return "https://bsc-dataseed.binance.org/";
case 5:
return getRpcURL("goerli", key);
case 11155111:
return getRpcURL("sepolia", key);
case 420:
return getRpcURL("optimism-goerli", key);
case 80001:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const Button: React.FC<IButtonProps> = (props) => {
const theme = useContext(ThemeContext);

const { onClick, width, height, customStyle } = props;
console.log(customStyle)

return (
<ThemeProvider theme={theme}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export interface ICheckboxProps {

export const Checkbox = (props: ICheckboxProps) => {
const theme = useContext(ThemeContext);
console.log(props)
return (
<ThemeProvider theme={theme}>
<CheckboxContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ function Dropdown({
document.body.removeChild(el);
}
};
console.log(dropdownValues)
return (
<>
{dropdownValues.map((dropdownValue) =>
Expand Down
1 change: 1 addition & 0 deletions packages/uiweb/src/lib/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const NETWORK_DETAILS = {
420: {},
};

//todo: need to change o sepolia
export const CoreContractChainId = {
prod: 1,
dev: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const useVerifyAccessControl = () => {
});
setLoading(false);
if (response.chat === false) {
console.log('in hereeeee response false')
setVerificationSuccessfull(false);
} else if (response.chat === true) {
setVerified(true);
Expand Down
Loading