Skip to content

Commit

Permalink
Identify starknet by chainType, not chainId
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Dec 17, 2024
1 parent a3b1b92 commit 2b998f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Form/ChainConfigurationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export type FormValues = {
ocr2RebalancerPluginEnabled: boolean
}

const isStarknet = (chainID: string): boolean => {
return chainID === 'SN_MAIN' || chainID === 'SN_SEPOLIA'
const isStarknet = (chainType: string): boolean => {
return chainType === 'STARKNET'
}

const ValidationSchema = Yup.object().shape({
Expand Down Expand Up @@ -117,7 +117,7 @@ interface AccountAddrFieldProps extends FieldAttributes<any> {

const AccountAddrField = ({ addresses, ...props }: AccountAddrFieldProps) => {
const {
values: { chainID, accountAddr },
values: { chainID, chainType, accountAddr },
setFieldValue,
} = useFormikContext<FormValues>()

Expand Down Expand Up @@ -148,7 +148,7 @@ const AccountAddrField = ({ addresses, ...props }: AccountAddrFieldProps) => {

return (
<>
{!isStarknet(chainID) && (
{!isStarknet(chainType) && (
<Field
{...props}
select
Expand All @@ -162,7 +162,7 @@ const AccountAddrField = ({ addresses, ...props }: AccountAddrFieldProps) => {
))}
</Field>
)}
{isStarknet(chainID) && (
{isStarknet(chainType) && (
<Field
component={TextField}
id="accountAddr"
Expand All @@ -174,7 +174,7 @@ const AccountAddrField = ({ addresses, ...props }: AccountAddrFieldProps) => {
fullWidth
/>
)}
{isStarknet(chainID) && (
{isStarknet(chainType) && (
<div>
<Field
component={TextField}
Expand Down

0 comments on commit 2b998f8

Please sign in to comment.