From e70994e89d58c2195ca47b8c69ec8de296e3278c Mon Sep 17 00:00:00 2001 From: "David E. Perez Negron Rocha" Date: Fri, 12 Jun 2020 00:26:29 -0500 Subject: [PATCH 1/2] Fix for a diferent directories for Proyect Receipts, so that Receipts is for DECAs Distributed Database --- .gitignore | 1 + receipts.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 486ea91..9499476 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /node_modules /orbitdb /receipts +/proyectsReceipts package-lock.json .env diff --git a/receipts.sh b/receipts.sh index 195ff6a..63c16f2 100755 --- a/receipts.sh +++ b/receipts.sh @@ -21,7 +21,7 @@ case "$choice" in *) echo "no option selected";; esac -receiptsRoute=./receipts +receiptsRoute=./proyectsReceipts echo "" echo "IPFS GET(Download) DECA's Carbon Credits Receipts?:" @@ -40,3 +40,4 @@ case "$choice" in esac echo "Bye ;) $USERNAME" + From ea4518052391c36bdc7b9e51dc400bda04f2a6c2 Mon Sep 17 00:00:00 2001 From: "David E. Perez Negron Rocha" Date: Fri, 12 Jun 2020 16:30:25 -0500 Subject: [PATCH 2/2] Adding official DECA OrbitDB Database --- index.js | 4 ++-- interfaz.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index eb18fc2..55a0817 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const IpfsClient = require('ipfs-http-client'); const OrbitDB = require('orbit-db'); //Instance of ipfs locally in ipfs daemon const node = IpfsClient('http://localhost:5001'); -const addressDB = 'decaCCDB'; +const addressDB = '/orbitdb/zdpuAykPJ4qtBg2toS2vxr5eaPfGEBJmvGerM7V7x8qn5c8hW/decaCCDB'; //Async function to replicate or create a doc database async function createReplicate() { @@ -39,4 +39,4 @@ async function createReplicate() { } //Call the async function -createReplicate(); \ No newline at end of file +createReplicate(); diff --git a/interfaz.js b/interfaz.js index b4ff2c8..53c2a14 100644 --- a/interfaz.js +++ b/interfaz.js @@ -6,7 +6,7 @@ let moment = require('moment'); let hasher = require('node-object-hash') const fs = require('fs'); -const addressDB = 'decaCCDB'; +const addressDB = '/orbitdb/zdpuAykPJ4qtBg2toS2vxr5eaPfGEBJmvGerM7V7x8qn5c8hW/decaCCDB'; //A instance of ipfs locally in ipfs daemon const ipfs = IpfsClient('http://localhost:5001');