fix: spdv-963 - Expired admin drive upgrading handling (#230)

* fix: spdv-963

* refactor: spdv-963
This commit is contained in:
rolandlor
2026-03-18 16:00:22 +01:00
committed by Bálint Ujvári
parent db52e4471a
commit e1fdd52676
2 changed files with 28 additions and 2 deletions
@@ -26,6 +26,7 @@ import { getHumanReadableFileSize } from '../../../../utils/file'
import { FILE_MANAGER_EVENTS, POLLING_TIMEOUT_MS } from '../../constants/common'
import { desiredLifetimeOptions } from '../../constants/stamps'
import { useStampPolling } from '../../hooks/useStampPolling'
import { validateStampStillExists } from '../../utils/bee'
import { fromBytesConversion, getExpiryDateByLifetime, truncateNameMiddle } from '../../utils/common'
import { Button } from '../Button/Button'
import { CustomDropdown } from '../CustomDropdown/CustomDropdown'
@@ -334,6 +335,16 @@ export function UpgradeDriveModal({
onClick={async () => {
if (!beeApi || !walletBalance) return
const isStampValid = await validateStampStillExists(beeApi, stamp.batchID)
if (!isStampValid) {
setErrorMessage?.('The admin drive has expired. Please clear the browser cache and reload the page.')
setShowError(true)
onCancelClick()
return
}
try {
setIsSubmitting(true)
window.dispatchEvent(