Skip to content

Commit

Permalink
🔥 Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Nov 3, 2023
1 parent 7c79d5e commit e6c6ca8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 47 deletions.
60 changes: 14 additions & 46 deletions components/IscnUploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,39 +198,6 @@
class="whitespace-pre-line"
/>
</Dialog>
<Dialog
v-model="isOpenSignDialog"
:header-text="$t('IscnRegisterForm.button.uploading')"
:is-disabled-backdrop-click="true"
:has-close-button="signDialogError"
@close="handleSignDialogClose"
>
<template #header-prepend>
<IconStar class="w-[20px]" />
</template>
<ProgressIndicator
class="mx-auto mb-[24px]"
/>
<div class="text-center text-medium-gray text-[24px] font-500">{{ signDialogMessage }}</div>
<pre
v-if="signDialogError"
:class="[
'mt-[12px]',
'p-[8px]',
'bg-red',
'bg-opacity-20',
'rounded-[8px]',
'text-red',
'text-[12px]',
'font-400',
]"
>{{ signDialogError }}</pre>
<Divider class="mt-[12px] mb-[8px]" />
<span
v-t="'IscnRegisterForm.signDialog.sign.arweave.uploading'"
class="whitespace-pre-line"
/>
</Dialog>
</Card>
<AttentionsLedger />
<Snackbar
Expand Down Expand Up @@ -524,17 +491,19 @@ export default class UploadForm extends Vue {
async estimateArweaveFee(): Promise<void> {
try {
const pricePromises = this.fileRecords.map(record =>
estimateBundlrFilePrice({
fileSize: record.fileBlob?.size || 0,
ipfsHash: record.ipfsHash,
}).then(priceResult => ({
...priceResult,
ipfsHash: record.ipfsHash,
})),
);
const results = await Promise.all(pricePromises);
const results = await Promise.all(
this.fileRecords.map(async (record) => {
const priceResult = await estimateBundlrFilePrice({
fileSize: record.fileBlob?.size || 0,
ipfsHash: record.ipfsHash,
})
return {
...priceResult,
ipfsHash: record.ipfsHash,
}
}),
)
let totalFee = new BigNumber(0);
results.forEach(result => {
const { address, arweaveId, LIKE, ipfsHash } = result;
Expand Down Expand Up @@ -638,11 +607,10 @@ export default class UploadForm extends Vue {
if (IS_CHAIN_UPGRADING) return
logTrackerEvent(this, 'ISCNCreate', 'ClickUpload', '', 1);
this.uploadStatus = 'uploading'
this.$emit('handleSubmit')
this.error = ''
this.signDialogError = ''
const [balance] = await Promise.all([getAccountBalance(this.address)])
const balance = await getAccountBalance(this.address);
this.balance = new BigNumber(balance);
if (this.balance.lt(this.arweaveFee)) {
this.error = 'INSUFFICIENT_BALANCE'
Expand Down
1 change: 0 additions & 1 deletion pages/new/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
:step="step"
@submit="onSubmitUpload"
@arweaveUploaded="onArweaveIdUpload"
@handleSubmit="isSubmit = true"
/>
<IscnRegisterForm
v-else-if="state === 'iscn'"
Expand Down

0 comments on commit e6c6ca8

Please sign in to comment.