diff --git a/components/IscnRegisterForm.vue b/components/IscnRegisterForm.vue index dbab3546..cdc986a3 100644 --- a/components/IscnRegisterForm.vue +++ b/components/IscnRegisterForm.vue @@ -1043,12 +1043,13 @@ export default class IscnRegisterForm extends Vue { numbersProtocolAssetId: [...this.numbersProtocolAssetIds.values()], fileSHA256: this.fileRecords.map((file) => file.fileSHA256), author: this.author.name, + authorDescription: this.author.authorDescription, authorNames: this.authorNames, + authorDescriptions: this.authorDescriptions, authorUrls: this.authorUrls, authorWallets: this.authorWalletAddresses, likerIds: this.likerIds, likerIdsAddresses: this.likerIdsAddresses, - authorDescriptions: this.authorDescriptions, contentFingerprints: this.contentFingerprintLinks, inLanguage: this.language, thumbnailUrl: this.thumbnailUrl, @@ -1157,7 +1158,7 @@ export default class IscnRegisterForm extends Vue { this.name = this.epubMetadata.title || '' this.description = this.extractText(this.epubMetadata.description) this.author.name = this.epubMetadata.author || '' - this.author.authorDescription = 'Author' + this.author.authorDescription = '' this.tags = this.epubMetadata.tags || [] this.thumbnailUrl = this.formatArweave( this.epubMetadata.thumbnailArweaveId, @@ -1191,7 +1192,7 @@ export default class IscnRegisterForm extends Vue { wallet: [{ content: address, id: 1, type: 'like', isOpenOptions: false }], url: [], likerId: userData?.user || '', - authorDescription: userData?.description || 'Publisher', + authorDescription: userData?.description || '', } } diff --git a/utils/cosmos/iscn/iscn.type.ts b/utils/cosmos/iscn/iscn.type.ts index cbeb32db..798c9e3d 100644 --- a/utils/cosmos/iscn/iscn.type.ts +++ b/utils/cosmos/iscn/iscn.type.ts @@ -14,6 +14,7 @@ export interface ISCNRegisterPayload { type: string; publisher?: string, author: string; + authorDescription?: string; authorNames: string[]; authorUrls: string[][]; authorWallets: any[][]; diff --git a/utils/cosmos/iscn/sign.ts b/utils/cosmos/iscn/sign.ts index 1c81a027..39464112 100644 --- a/utils/cosmos/iscn/sign.ts +++ b/utils/cosmos/iscn/sign.ts @@ -37,12 +37,13 @@ export function formatISCNTxPayload(payload: ISCNRegisterPayload): ISCNSignPaylo arweaveId, fileSHA256, author, + authorDescription, authorNames, + authorDescriptions, authorUrls, authorWallets, likerIds, likerIdsAddresses, - authorDescriptions, numbersProtocolAssetId, contentFingerprints: contentFingerprintsInput = [], stakeholders: stakeholdersInput = [], @@ -135,10 +136,15 @@ export function formatISCNTxPayload(payload: ISCNRegisterPayload): ISCNSignPaylo } } + const authorEntity = (author && authorDescription) ? { + name: author, + description: authorDescription, + } : author + return { ...data, publisher: publisherInput, - author, + author: authorEntity, keywords: tagsString.split(','), usageInfo: license, contentFingerprints: [...new Set(contentFingerprints)],