Skip to content

Commit

Permalink
🔀 Merge #390 updates to deploy/rinkeby
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Sep 20, 2023
2 parents 65460bf + f14d898 commit efd1714
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,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 @@ -1172,6 +1173,7 @@ export default class IscnRegisterForm extends Vue {
logTrackerEvent(this, 'ISCNCreate', 'SubmitToNumbers', '', 1);
}
this.isUploadingArweave = true;
this.uploadStatus = 'uploading';
try {
const arrayBuffer = await this.fileBlob.arrayBuffer();
const buffer = Buffer.from(arrayBuffer);
Expand Down Expand Up @@ -1206,6 +1208,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 @@ -1250,6 +1253,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
9 changes: 6 additions & 3 deletions utils/arweave/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,11 @@ export async function uploadSingleFileToBundlr(
}: { fileSize: number; fileType?: string, ipfsHash: string; txHash: string },
) {
const bundler = await getBundler({ fileSize, ipfsHash, txHash })
const response = await bundler.upload(file, {
tags: fileType ? [{ name: 'Content-Type', value: fileType }] : [],
})
const tags = [
{ name: 'IPFS-Add', value: ipfsHash },
{ name: 'standard', value: 'v0.1'},
];
if (fileType) tags.push({ name: 'Content-Type', value: fileType })
const response = await bundler.upload(file, { tags })
return response.id
}

0 comments on commit efd1714

Please sign in to comment.