diff --git a/components/IscnUploadForm.vue b/components/IscnUploadForm.vue index 10e1b50f..8a7be313 100644 --- a/components/IscnUploadForm.vue +++ b/components/IscnUploadForm.vue @@ -750,7 +750,6 @@ export default class IscnUploadForm extends Vue { if (!this.signer) throw new Error('SIGNER_NOT_INITED'); if (!this.arweaveFeeTargetAddress) throw new Error('TARGET_ADDRESS_NOT_SET'); if (!this.arweaveFeeMap[record.ipfsHash]) throw new Error('ARWEAVE_FEE_NOT_SET'); - this.uploadStatus = 'signing'; const memo = JSON.stringify({ ipfs: record.ipfsHash, fileSize: record.fileBlob?.size || 0 }); try { const { transactionHash } = await sendLIKE(this.address, this.arweaveFeeTargetAddress, this.arweaveFeeMap[record.ipfsHash], this.signer, memo); @@ -780,10 +779,13 @@ export default class IscnUploadForm extends Vue { tempRecord.transactionHash = transactionHash if (!tempRecord.transactionHash) { + this.uploadStatus = 'signing'; tempRecord.transactionHash = await this.sendArweaveFeeTx(tempRecord); if (!tempRecord.transactionHash) { + this.uploadStatus = ''; throw new Error('TRANSACTION_NOT_SENT') } + this.uploadStatus = 'uploading'; } try { @@ -868,9 +870,11 @@ export default class IscnUploadForm extends Vue { this.addToEpubMetadataList(file.ipfsHash, existingData.arweaveId) return } + this.uploadStatus = 'signing'; const transactionHash = // eslint-disable-next-line no-await-in-loop existingData.transactionHash || (await this.sendArweaveFeeTx(file)) + this.uploadStatus = 'uploading'; // eslint-disable-next-line no-await-in-loop const arweaveId = await this.uploadFileAndGetArweaveId( file,