feat: download empty txt file for keystore files

This commit is contained in:
RadoslavDimchev 2023-10-08 15:04:24 +03:00
parent 49129c6a82
commit 715c815d5f
1 changed files with 8 additions and 1 deletions

View File

@ -25,7 +25,14 @@ const KeystoreFiles = () => {
setConfirmEncryptedPassword('') setConfirmEncryptedPassword('')
} }
const downloadKeyFilesHandler = () => {} const downloadKeyFilesHandler = () => {
const element = document.createElement('a')
const file = new Blob([''], { type: 'text/plain' })
element.href = URL.createObjectURL(file)
element.download = 'keystore_files.txt'
document.body.appendChild(element)
element.click()
}
return ( return (
<YStack space={'$4'}> <YStack space={'$4'}>