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 Roles v1 detection in module select #86

Merged
merged 3 commits into from
Feb 16, 2024
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
2 changes: 1 addition & 1 deletion extension/src/browser/ProvideProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {
} from 'react'
import { decodeSingle, encodeMulti, encodeSingle } from 'react-multisend'

import { ChainId, MULTI_SEND_ADDRESS } from '../chains'
import { MULTI_SEND_ADDRESS } from '../chains'
import {
ForkProvider,
useTenderlyProvider,
Expand Down
2 changes: 1 addition & 1 deletion extension/src/components/Address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Address: React.FC<Props> = ({
const displayAddress = shortenAddress(checksumAddress)

return (
<Box rounded className={cn(className, classes.container)}>
<Box rounded className={cn(classes.container, className)}>
<div className={classes.address}>{displayAddress}</div>
<Box rounded className={classes.blockieContainer}>
{address && <Blockie address={address} className={classes.blockies} />}
Expand Down
2 changes: 1 addition & 1 deletion extension/src/components/BlockButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Props = React.DetailedHTMLProps<
>

const BoxButton: React.FC<Props> = ({ className, ...rest }) => (
<button className={cn(className, classes.button)} {...rest} />
<button className={cn(classes.button, className)} {...rest} />
)

export default BoxButton
2 changes: 1 addition & 1 deletion extension/src/components/BoxButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Props = React.DetailedHTMLProps<
>

const BlockButton: React.FC<Props> = ({ className, ...rest }) => (
<button className={cn(className, classes.button)} {...rest} />
<button className={cn(classes.button, className)} {...rest} />
)

export default BlockButton
2 changes: 1 addition & 1 deletion extension/src/components/IconButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = React.DetailedHTMLProps<

const IconButton: React.FC<Props> = ({ className, danger, ...rest }) => (
<button
className={cn(classes.button, className, { [classes.danger]: danger })}
className={cn(classes.button, { [classes.danger]: danger }, className)}
{...rest}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion extension/src/components/Tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Props {
}

const Tag: React.FC<Props> = ({ head, children, color, className }) => (
<div className={cn(className, classes.container, classes[color])}>
<div className={cn(classes.container, classes[color], className)}>
{head && <div className={classes.head}>{head}</div>}
{children && <div className={classes.body}>{children}</div>}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ button.removeButton:hover {
}

.modifyButton {
position: absolute;
position: absolute !important;
top: var(--spacing-4);
right: var(--spacing-4);
background: none;
Expand Down
6 changes: 5 additions & 1 deletion extension/src/connections/useZodiacModules.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsonRpcBatchProvider } from '@ethersproject/providers'

Check warning on line 1 in extension/src/connections/useZodiacModules.ts

View workflow job for this annotation

GitHub Actions / tests

'JsonRpcBatchProvider' is defined but never used. Allowed unused vars must match /^_/u
import {
ContractAbis,
ContractAddresses,
Expand All @@ -13,7 +13,8 @@

import { validateAddress } from '../utils'
import { useConnection } from './connectionHooks'
import { ChainId, RPC } from '../chains'

Check warning on line 16 in extension/src/connections/useZodiacModules.ts

View workflow job for this annotation

GitHub Actions / tests

'RPC' is defined but never used. Allowed unused vars must match /^_/u
import { getReadOnlyProvider } from '../providers/readOnlyProvider'

const SUPPORTED_MODULES = [
KnownContracts.DELAY,
Expand Down Expand Up @@ -44,7 +45,7 @@

useEffect(() => {
if (!chainId) return
const provider = new JsonRpcBatchProvider(RPC[chainId as ChainId], chainId)
const provider = getReadOnlyProvider(chainId as ChainId)

setLoading(true)
setError(false)
Expand Down Expand Up @@ -93,6 +94,9 @@

const implementationAddress = mastercopyAddress || moduleAddress

// 'roles' is the old name for roles_v1 is still configured as an alias in the zodiac package for backwards compatibility
if (type === KnownContracts.ROLES) type = KnownContracts.ROLES_V1

if (!type) {
// Not a proxy to one of our master copies. It might be a custom deployment.
// We try to detect selectors from byte code and match them against the ABIs of known Zodiac modules.
Expand Down
Loading