diff --git a/2-Contracts-and-Documents/contract-register-minimal.js b/2-Contracts-and-Documents/contract-register-minimal.js index 0fb7b39..1d4f53d 100644 --- a/2-Contracts-and-Documents/contract-register-minimal.js +++ b/2-Contracts-and-Documents/contract-register-minimal.js @@ -31,10 +31,9 @@ const registerContract = async () => { }; const contract = await platform.contracts.create(contractDocuments, identity); - console.dir({ contract }); + console.dir({ contract: contract.toJSON() }); // Make sure contract passes validation checks - await platform.dpp.initialize(); const validationResult = await platform.dpp.dataContract.validate(contract); if (validationResult.isValid()) { diff --git a/2-Contracts-and-Documents/contract-update-minimal.js b/2-Contracts-and-Documents/contract-update-minimal.js index ec90f5c..21d69f3 100644 --- a/2-Contracts-and-Documents/contract-update-minimal.js +++ b/2-Contracts-and-Documents/contract-update-minimal.js @@ -30,7 +30,6 @@ const updateContract = async () => { existingDataContract.setDocuments(documents); // Make sure contract passes validation checks - await platform.dpp.initialize(); const validationResult = await platform.dpp.dataContract.validate( existingDataContract, ); diff --git a/2-Contracts-and-Documents/document-delete.js b/2-Contracts-and-Documents/document-delete.js index 9a945d0..eb76359 100644 --- a/2-Contracts-and-Documents/document-delete.js +++ b/2-Contracts-and-Documents/document-delete.js @@ -35,6 +35,6 @@ const deleteNoteDocument = async () => { }; deleteNoteDocument() - .then((d) => console.log('Document deleted:\n', d)) + .then((d) => console.log('Document deleted:\n', d.toJSON())) .catch((e) => console.error('Something went wrong:\n', e)) .finally(() => client.disconnect()); diff --git a/2-Contracts-and-Documents/document-update.js b/2-Contracts-and-Documents/document-update.js index 1276393..0e641ce 100644 --- a/2-Contracts-and-Documents/document-update.js +++ b/2-Contracts-and-Documents/document-update.js @@ -38,6 +38,6 @@ const updateNoteDocument = async () => { }; updateNoteDocument() - .then((d) => console.log('Document updated:\n', d)) + .then((d) => console.log('Document updated:\n', d.toJSON())) .catch((e) => console.error('Something went wrong:\n', e)) .finally(() => client.disconnect());