diff --git a/components/IscnUploadForm.vue b/components/IscnUploadForm.vue index 950c7923..e3a470aa 100644 --- a/components/IscnUploadForm.vue +++ b/components/IscnUploadForm.vue @@ -654,10 +654,10 @@ export default class IscnUploadForm extends Vue { } } - async sendArweaveFeeTx(records: any): Promise { + async sendArweaveFeeTx(record: any): Promise { logTrackerEvent(this, 'ISCNCreate', 'SendArFeeTx', '', 1); - if (this.sentArweaveTransactionInfo.has(records.ipfsHash)) { - const transactionInfo = this.sentArweaveTransactionInfo.get(records.ipfsHash); + if (this.sentArweaveTransactionInfo.has(record.ipfsHash)) { + const transactionInfo = this.sentArweaveTransactionInfo.get(record.ipfsHash); if (transactionInfo && transactionInfo.transactionHash) { return transactionInfo.transactionHash; } @@ -667,12 +667,12 @@ 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'); this.uploadStatus = 'signing'; - const memo = JSON.stringify({ ipfs: records.ipfsHash, fileSize: records.fileBlob?.size || 0 }); + const memo = JSON.stringify({ ipfs: record.ipfsHash, fileSize: record.fileBlob?.size || 0 }); try { const { transactionHash } = await sendLIKE(this.address, this.arweaveFeeTargetAddress, this.arweaveFee.toFixed(), this.signer, memo); if (transactionHash) { - const existingData = this.sentArweaveTransactionInfo.get(records.ipfsHash) || {}; - this.sentArweaveTransactionInfo.set(records.ipfsHash, { ...existingData, transactionHash }); + const existingData = this.sentArweaveTransactionInfo.get(record.ipfsHash) || {}; + this.sentArweaveTransactionInfo.set(record.ipfsHash, { ...existingData, transactionHash }); return transactionHash; } @@ -687,11 +687,11 @@ export default class IscnUploadForm extends Vue { return ''; } - async submitToArweave(records: any): Promise { - const existingData = this.sentArweaveTransactionInfo.get(records.ipfsHash) || {}; + async submitToArweave(record: any): Promise { + const existingData = this.sentArweaveTransactionInfo.get(record.ipfsHash) || {}; const { transactionHash, arweaveId: uploadArweaveId } = existingData; if (uploadArweaveId) return - const tempRecord = {...records} + const tempRecord = {...record} logTrackerEvent(this, 'ISCNCreate', 'SubmitToArweave', '', 1); if (!tempRecord.fileBlob) return; this.isOpenSignDialog = true; @@ -715,10 +715,10 @@ export default class IscnUploadForm extends Vue { txHash: tempRecord.transactionHash, }); if (arweaveId) { - const uploadedData = this.sentArweaveTransactionInfo.get(records.ipfsHash) || {}; - this.sentArweaveTransactionInfo.set(records.ipfsHash, { ...uploadedData, arweaveId }); + const uploadedData = this.sentArweaveTransactionInfo.get(record.ipfsHash) || {}; + this.sentArweaveTransactionInfo.set(record.ipfsHash, { ...uploadedData, arweaveId }); if (tempRecord.fileName.includes('cover.jpeg')) { - const metadata = this.epubMetadataList.find((file: any) => file.thum === records.ipfsHash) + const metadata = this.epubMetadataList.find((file: any) => file.thum === record.ipfsHash) if (metadata) { metadata.thumbnailArweaveId = arweaveId }