Changed anchor proof file
This commit is contained in:
parent
547ab0b230
commit
98a1694261
@ -87,7 +87,7 @@ export default class OfficeFoldersController extends ApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sortedHashes = [...folderHashes].sort();
|
const sortedHashes = [...folderHashes].sort();
|
||||||
const anchoringProof = await this.secureService.download(sortedHashes);
|
const anchoringProof = await this.secureService.download(sortedHashes, officeFolder.name);
|
||||||
|
|
||||||
const addFileToZip = (zip: Zip) => (uid: string): Promise<void> =>
|
const addFileToZip = (zip: Zip) => (uid: string): Promise<void> =>
|
||||||
(async () => {
|
(async () => {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -63,7 +63,7 @@ export default class SecureService extends BaseService {
|
|||||||
* @description : Download the anchoring proof document
|
* @description : Download the anchoring proof document
|
||||||
* @throws {Error} If transaction is not verified on chain
|
* @throws {Error} If transaction is not verified on chain
|
||||||
*/
|
*/
|
||||||
public async download(hash_sources: string[]) {
|
public async download(hash_sources: string[], office_name: string) {
|
||||||
const anchor = await this.verify(hash_sources);
|
const anchor = await this.verify(hash_sources);
|
||||||
|
|
||||||
if (anchor.transactions.length === 0) {
|
if (anchor.transactions.length === 0) {
|
||||||
@ -71,6 +71,8 @@ export default class SecureService extends BaseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const transaction = anchor.transactions[0];
|
const transaction = anchor.transactions[0];
|
||||||
|
console.log(transaction);
|
||||||
|
|
||||||
|
|
||||||
if (transaction.status !== EAnchoringStatus.VERIFIED_ON_CHAIN) {
|
if (transaction.status !== EAnchoringStatus.VERIFIED_ON_CHAIN) {
|
||||||
throw new Error(`Transaction not verified on chain: ${transaction.status}`);
|
throw new Error(`Transaction not verified on chain: ${transaction.status}`);
|
||||||
@ -83,6 +85,7 @@ export default class SecureService extends BaseService {
|
|||||||
timeZone: "Europe/Paris",
|
timeZone: "Europe/Paris",
|
||||||
timeZoneName: "short",
|
timeZoneName: "short",
|
||||||
}),
|
}),
|
||||||
|
office_name: office_name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user