Skip to content

Commit

Permalink
refactor: updated styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Params10 committed Mar 20, 2023
1 parent fd9679c commit 1bc7176
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/scripts/policyUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ async function main(filePath: string) {
policyRegistryDeployment.address
)) as PolicyRegistry;
for (const courtObject of courtsV1) {
var courtV2 = courtObject.court + 1;
var filename = courtObject.name.replace(" ", "-").concat(".json");
const courtV2 = courtObject.court + 1;
const filename = courtObject.name.replace(" ", "-").concat(".json");
const data = { name: courtObject.name, description: courtObject.description, summary: courtObject.summary };
let response = await uploadDataToIPFS(data, filename);
const response = await uploadDataToIPFS(data, filename);
console.log(response);

if (response && response.statusCode === 200) {
try {
console.log(courtV2, courtObject.name);
const data = await JSON.parse(response.body);
const ipfsPath = "/ipfs/" + data.message.Metadata.cid;
const responseData = await JSON.parse(response.body);
const ipfsPath = "/ipfs/" + responseData.message.Metadata.cid;
await policyRegistry.connect(governor).setPolicy(courtV2, courtObject.name, ipfsPath);
} catch (error) {
console.log(error);
Expand Down

0 comments on commit 1bc7176

Please sign in to comment.