toasters on save key

pull/3606/head
Aniket-Engg 2 years ago committed by Aniket
parent 4df9e881ed
commit cb4e33fd54
  1. 8
      apps/etherscan/src/app/views/CaptureKeyView.tsx

@ -23,8 +23,12 @@ export const CaptureKeyView: React.FC = () => {
return errors
}}
onSubmit={(values) => {
setAPIKey(values.apiKey)
navigate((location.state as any).from)
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