Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed May 8, 2024
1 parent 3c2c48f commit 4bf1f03
Show file tree
Hide file tree
Showing 3 changed files with 7,247 additions and 10,059 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { useState } from 'react'
import {
Box,
Button,
Text,
Spinner,
} from '@0xsequence/design-system'
import { PINCodeInput } from './PINCodeInput'


export interface WaasCodeInputContentProps {
isLoading: boolean
onVerify: () => {}
}

export const WaasCodeInputContent = ({
isLoading,
onVerify
}: WaasCodeInputContentProps) => {
const [waasEmailPinCode, setWaasEmailPinCode] = useState<string[]>([])


return (
<>
<Box paddingY="6" alignItems="center" justifyContent="center" flexDirection="column">
<Text marginTop="5" marginBottom="4" variant="normal" color="text80">
Enter code received in email.
</Text>
<PINCodeInput value={waasEmailPinCode} digits={6} onChange={setWaasEmailPinCode} />

<Box gap="2" marginY="4" alignItems="center" justifyContent="center" style={{ height: '44px' }}>
{isLoading ? (
<Spinner />
) : (
<Button
variant="primary"
disabled={waasEmailPinCode.includes('')}
label="Verify"
onClick={() => onVerify()}
data-id="verifyButton"
/>
)}
</Box>
</Box>
</>
)
}
4 changes: 3 additions & 1 deletion packages/kit/src/hooks/useWaasRevalidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import type { SequenceWaasConnector } from '@0xsequence/kit-connectors'


export function useWaasRevalidation(
// waasConnector?: any
) {
const { connector } = useAccount()

Expand All @@ -30,6 +29,9 @@ export function useWaasRevalidation(

sequenceWaas.onValidationRequired(() => {
console.log('TODO: requires validation!')
// Trigger modal + input callback

// sequenceWaas.finishValidateSession('string')
})
}
setup()
Expand Down
Loading

0 comments on commit 4bf1f03

Please sign in to comment.