toasters on save key

pull/5370/head
Aniket-Engg 2 years ago committed by Aniket
parent 94d321cbf5
commit e11b7026cb
  1. 4
      apps/etherscan/src/app/views/CaptureKeyView.tsx

@ -23,8 +23,12 @@ export const CaptureKeyView: React.FC = () => {
return errors
}}
onSubmit={(values) => {
const apiKey = values.apiKey
if (apiKey.length === 34) {
setAPIKey(values.apiKey)
clientInstance.call('notification' as any, 'toast', 'API key saved successfully!!!')
navigate((location.state as any).from)
} else clientInstance.call('notification' as any, 'toast', 'API key should be 34 characters long')
}}
>
{({ errors, touched, handleSubmit }) => (

Loading…
Cancel
Save