Skip to content

Commit

Permalink
🚸 Remove invalid num id and add upload status update
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 21, 2023
1 parent 4d27282 commit 385ecd8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ export default class IscnRegisterForm extends Vue {
async onUploadOnly(): Promise<void> {
logTrackerEvent(this, 'ISCNCreate', 'ClickUpload', '', 1);
this.uploadStatus = 'loading'
await this.getLikerIdsAddresses()
this.$emit('handleSubmit')
this.error = ''
Expand Down Expand Up @@ -1178,10 +1179,10 @@ export default class IscnRegisterForm extends Vue {
formData.append('num', '1')
}
this.isUploadingArweave = true;
this.uploadStatus = 'uploading';
try {
const {
arweaveId,
numAssetIds: [numbersProtocolAssetId],
} = await this.$axios.$post(
`${API_POST_ARWEAVE_UPLOAD}?txHash=${transactionHash}`,
formData,
Expand All @@ -1193,8 +1194,7 @@ export default class IscnRegisterForm extends Vue {
)
if (arweaveId) {
this.uploadArweaveId = arweaveId
this.numbersProtocolAssetId = numbersProtocolAssetId
this.$emit('arweaveUploaded', { arweaveId, numbersProtocolAssetId })
this.$emit('arweaveUploaded', { arweaveId })
this.isOpenSignDialog = false
} else {
this.shouldShowAlert = true
Expand All @@ -1217,6 +1217,7 @@ export default class IscnRegisterForm extends Vue {
logTrackerEvent(this, 'ISCNCreate', 'SubmitToNumbers', '', 1);
this.isOpenSignDialog = true;
try {
this.uploadStatus = 'loading';
const formData = new FormData();
if (this.fileBlob) formData.append('file', this.fileBlob);
const {
Expand Down Expand Up @@ -1261,6 +1262,7 @@ export default class IscnRegisterForm extends Vue {
return
}
try {
this.uploadStatus = 'signing'
const res = await signISCNTx(formatISCNTxPayload(this.payload), this.signer, this.address)
this.uploadStatus = 'success'
this.$emit('txBroadcasted', res)
Expand Down

0 comments on commit 385ecd8

Please sign in to comment.