Skip to content

Commit

Permalink
feat: update native avaxc recovery forms
Browse files Browse the repository at this point in the history
  • Loading branch information
alia-bitgo committed Dec 11, 2023
1 parent 7b909d0 commit c322f5e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
10 changes: 0 additions & 10 deletions src/containers/BuildUnsignedSweepCoin/AvalancheCForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as Yup from 'yup';
import { Button, FormikTextfield } from '~/components';

const validationSchema = Yup.object({
apiKey: Yup.string().required(),
backupKey: Yup.string().required(),
backupKeyId: Yup.string(),
gasLimit: Yup.number()
Expand Down Expand Up @@ -36,7 +35,6 @@ export function AvalancheCForm({ onSubmit }: AvalancheCFormProps) {
const formik = useFormik<AvalancheCFormValues>({
onSubmit,
initialValues: {
apiKey: '',
backupKey: '',
backupKeyId: '',
gasLimit: 500000,
Expand Down Expand Up @@ -103,14 +101,6 @@ export function AvalancheCForm({ onSubmit }: AvalancheCFormProps) {
Width="fill"
/>
</div>
<div className="tw-mb-4">
<FormikTextfield
HelperText="An API-Key Token from snowtrace.com required for Avalanche C-Chain Mainnet recoveries."
Label="API Key"
name="apiKey"
Width="fill"
/>
</div>
<div className="tw-mb-4">
<FormikTextfield
HelperText="Gas limit for the AVAXC transaction. The value should be between 30,000 and 20,000,000. The default is 500,000 units of gas."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ function Form() {
try {
await window.commands.setBitGoEnvironment(
bitGoEnvironment,
coin,
values.apiKey
coin
);
const chainData = await window.queries.getChain(coin);

Expand Down
10 changes: 0 additions & 10 deletions src/containers/NonBitGoRecoveryCoin/AvalancheCForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '~/components';

const validationSchema = Yup.object({
apiKey: Yup.string().required(),
backupKey: Yup.string().required(),
gasLimit: Yup.number()
.typeError('Gas limit must be a number')
Expand Down Expand Up @@ -43,7 +42,6 @@ export function AvalancheCForm({ onSubmit }: AvalancheCFormProps) {
const formik = useFormik<AvalancheCFormValues>({
onSubmit,
initialValues: {
apiKey: '',
backupKey: '',
gasLimit: 500000,
gasPrice: 30,
Expand Down Expand Up @@ -123,14 +121,6 @@ export function AvalancheCForm({ onSubmit }: AvalancheCFormProps) {
Width="fill"
/>
</div>
<div className="tw-mb-4">
<FormikTextfield
HelperText="An API-Key Token from snowtrace.com required for Avalanche C-Chain Mainnet recoveries."
Label="API Key"
name="apiKey"
Width="fill"
/>
</div>
<div className="tw-mb-4">
<FormikTextfield
HelperText="Gas limit for the AVAXC transaction. The value should be between 30,000 and 20,000,000. The default is 500,000 units of gas."
Expand Down
3 changes: 1 addition & 2 deletions src/containers/NonBitGoRecoveryCoin/NonBitGoRecoveryCoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ function Form() {
try {
await window.commands.setBitGoEnvironment(
bitGoEnvironment,
coin,
values.apiKey
coin
);
const chainData = await window.queries.getChain(coin);
const recoverData = await window.commands.recover(coin, {
Expand Down

0 comments on commit c322f5e

Please sign in to comment.