Skip to content

Commit

Permalink
feat(avaxc): add support for evm ccr
Browse files Browse the repository at this point in the history
API Key changes

feat(avaxc): add support for evm ccr
TICKET-1708
  • Loading branch information
nrjsuthar committed Sep 26, 2024
1 parent bb79cc0 commit a743fcb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const validationSchema = Yup.object({
userKeyId: Yup.string(),
walletContractAddress: Yup.string().required(),
tokenContractAddress: Yup.string(),
apiKey: Yup.string().required(),
apiKey: Yup.string(),
wrongChain: Yup.string().required(),
intendedChain: Yup.string().required(),
}).required();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import {
CoinMetadata,
allWalletMetas,
} from '~/helpers/config';
import { BitgoEnv, isBscChain, safeEnv } from '~/helpers';
import { allCoinMetas } from '~/helpers/config';
import { BitgoEnv, isAvaxcCoin, safeEnv } from '~/helpers';

export function EvmCrossChainRecoveryBaseForm({
formik,
Expand All @@ -34,6 +33,7 @@ export function EvmCrossChainRecoveryBaseForm({
{`${coin.Title}: ${coin.Description}`}
</option>
));

wrongChainCoinsChildren.unshift(
<option disabled selected value="">
{' '}
Expand Down Expand Up @@ -128,7 +128,7 @@ export function EvmCrossChainRecoveryBaseForm({
Width="fill"
/>
</div>
{!isCustodyWallet && (
{!isCustodyWallet && !isAvaxcCoin(wrongChain) &&(
<div className="tw-mb-4">
<FormikTextfield
HelperText="An Api-Key Token required for the explorer."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const validationSchema = Yup.object({
walletContractAddress: Yup.string().required(),
walletPassphrase: Yup.string().required(),
tokenContractAddress: Yup.string(),
apiKey: Yup.string().required(),
apiKey: Yup.string(),
wrongChain: Yup.string().required(),
intendedChain: Yup.string().required(),
}).required();
Expand Down
5 changes: 5 additions & 0 deletions src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,8 @@ export function getEip1559Params(coin: string, maxFeePerGas: number, maxPriority
maxPriorityFeePerGas: toWei(maxPriorityFeePerGas),
}
}


export function isAvaxcCoin(chainName: string) {
return (chainName === 'tavaxc' || chainName === 'avaxc') ;
}

0 comments on commit a743fcb

Please sign in to comment.