Skip to content

Commit

Permalink
Merge pull request #75 from jupiter-project/feature/create-nft-token-…
Browse files Browse the repository at this point in the history
…detail-page

[chore] remove password inputs
  • Loading branch information
greatdolphinls authored Apr 30, 2021
2 parents 31c5881 + dff268e commit efecaca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
18 changes: 2 additions & 16 deletions containers/Auth/SignIn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import AuthWrapper, { authPageStyles } from '../Shared/AuthWrapper'
import useLoading from 'utils/hooks/useLoading'
import usePopUp from 'utils/hooks/usePopUp'
import LINKS from 'utils/constants/links'
import { ACCOUNT_VALID, STRING_VALID } from 'utils/constants/validations'
import { ACCOUNT_VALID } from 'utils/constants/validations'
import MESSAGES from 'utils/constants/messages'
import TEXT_MASKS from 'utils/constants/text-masks'

Expand All @@ -31,8 +31,7 @@ const useStyles = makeStyles((theme) => ({
}));

const schema = yup.object().shape({
account: ACCOUNT_VALID,
password: STRING_VALID
account: ACCOUNT_VALID
});

const SignIn = () => {
Expand All @@ -48,10 +47,6 @@ const SignIn = () => {
});

const onSubmit = useCallback(async (data) => {
if (data.password !== 'leda2021!!!') {
setPopUp({ text: 'Wrong Password' })
return
}
changeLoadingStatus(true)
try {
const response = await jupiterAPI.getAccountByAccountID(data.account);
Expand Down Expand Up @@ -90,15 +85,6 @@ const SignIn = () => {
control={control}
defaultValue=''
/>
<Controller
as={<AccountTextField />}
name='password'
label='Password'
error={errors.password?.message}
className={authClasses.input}
control={control}
defaultValue=''
/>
<ContainedButton
type='submit'
className={authClasses.button}
Expand Down
18 changes: 1 addition & 17 deletions parts/PurchaseNFTDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ import ContainedButton from 'components/UI/Buttons/ContainedButton'
import MagicTextField from 'components/UI/TextFields/MagicTextField'
import usePopUp from 'utils/hooks/usePopUp'
import useLoading from 'utils/hooks/useLoading'
import { PASSPHRASE_VALID, STRING_VALID } from 'utils/constants/validations'
import { PASSPHRASE_VALID } from 'utils/constants/validations'
import { NQT_WEIGHT } from 'utils/constants/common'
import MESSAGES from 'utils/constants/messages'

const schema = yup.object().shape({
passphrase: PASSPHRASE_VALID,
password: STRING_VALID
});

const useStyles = makeStyles((theme) => ({
Expand Down Expand Up @@ -63,10 +62,6 @@ const PurchaseNFTDialog = ({
});

const onSubmit = useCallback(async (data) => {
if (data.password !== 'leda2021!!!') {
setPopUp({ text: 'Wrong Password' })
return
}
changeLoadingStatus(true)
try {
const params = {
Expand Down Expand Up @@ -127,17 +122,6 @@ const PurchaseNFTDialog = ({
defaultValue=''
/>
</Grid>
<Grid item xs={12}>
<Controller
as={<MagicTextField />}
name='password'
label='Password'
error={errors.password?.message}
control={control}
defaultValue=''
/>
</Grid>

</Grid>
<ContainedButton
type='submit'
Expand Down

0 comments on commit efecaca

Please sign in to comment.