Skip to content

Commit 96fdf02

Browse files
rmdashthephez
andauthored
chore: update to match changes made on readme.io (#12)
* made updates to https://github.com/dashpay/platform-readme-tutorials/tree/v0.24-dev codes with Igor updates * chore: delete .DS_Store * igor doc update. * Delete .DS_Store --------- Co-authored-by: thephez <thephez@users.noreply.github.com>
1 parent 73e7291 commit 96fdf02

4 files changed

Lines changed: 3 additions & 5 deletions

File tree

2-Contracts-and-Documents/contract-register-minimal.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ const registerContract = async () => {
3131
};
3232

3333
const contract = await platform.contracts.create(contractDocuments, identity);
34-
console.dir({ contract });
34+
console.dir({ contract: contract.toJSON() });
3535

3636
// Make sure contract passes validation checks
37-
await platform.dpp.initialize();
3837
const validationResult = await platform.dpp.dataContract.validate(contract);
3938

4039
if (validationResult.isValid()) {

2-Contracts-and-Documents/contract-update-minimal.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const updateContract = async () => {
3030
existingDataContract.setDocuments(documents);
3131

3232
// Make sure contract passes validation checks
33-
await platform.dpp.initialize();
3433
const validationResult = await platform.dpp.dataContract.validate(
3534
existingDataContract,
3635
);

2-Contracts-and-Documents/document-delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ const deleteNoteDocument = async () => {
3535
};
3636

3737
deleteNoteDocument()
38-
.then((d) => console.log('Document deleted:\n', d))
38+
.then((d) => console.log('Document deleted:\n', d.toJSON()))
3939
.catch((e) => console.error('Something went wrong:\n', e))
4040
.finally(() => client.disconnect());

2-Contracts-and-Documents/document-update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ const updateNoteDocument = async () => {
3838
};
3939

4040
updateNoteDocument()
41-
.then((d) => console.log('Document updated:\n', d))
41+
.then((d) => console.log('Document updated:\n', d.toJSON()))
4242
.catch((e) => console.error('Something went wrong:\n', e))
4343
.finally(() => client.disconnect());

0 commit comments

Comments
 (0)