Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: YourJustice-Live/Glamdring
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4
Choose a base ref
...
head repository: YourJustice-Live/Glamdring
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 11 commits
  • 11 files changed
  • 3 contributors

Commits on Jun 17, 2022

  1. Merge pull request #107 from YourJustice-Live/dev

    Alert if there is some global problem
    kiv1n authored Jun 17, 2022
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6d5d0be View commit details
  2. Merge pull request #108 from YourJustice-Live/dev

    Fix for broken case contract
    kiv1n authored Jun 17, 2022
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1a4d760 View commit details

Commits on Jul 1, 2022

  1. Merge pull request #109 from YourJustice-Live/dev

    Email notifications, user friendly forms to create actions and rules
    kiv1n authored Jul 1, 2022
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aa68e76 View commit details

Commits on Jul 13, 2022

  1. Merge pull request #110 from YourJustice-Live/dev

    Integrated contracts with version 0.4.3 from Mumbai Testnet, added some feautures and fixed some bugs
    kiv1n authored Jul 13, 2022
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    84ea4f9 View commit details

Commits on Jul 22, 2022

  1. Fix comments

    kiv1n committed Jul 22, 2022
    Copy the full SHA
    471c092 View commit details

Commits on Nov 2, 2022

  1. Update package-lock.json

    toledoroy committed Nov 2, 2022
    1
    Copy the full SHA
    114610e View commit details
  2. Added Typescript

    toledoroy committed Nov 2, 2022
    Copy the full SHA
    14eb7e3 View commit details
  3. [FIX] IPFS URI Workaround

    toledoroy committed Nov 2, 2022
    1
    Copy the full SHA
    48b5307 View commit details
  4. Removed Log

    toledoroy committed Nov 2, 2022
    1
    Copy the full SHA
    cb438e5 View commit details

Commits on May 4, 2023

  1. Merge branch 'dev'

    kiv1n committed May 4, 2023
    1
    Copy the full SHA
    0f3fc2d View commit details
  2. 1
    Copy the full SHA
    1c2d8c1 View commit details
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@ NEXT_PUBLIC_VERSION=0.4

NEXT_PUBLIC_INFURA_NETWORK=maticmum
NEXT_PUBLIC_INFURA_KEY=83c4dbbe3bf9485aa4212ee63ee419b3
NEXT_PUBLIC_INFURA_IPFS_API=https://ipfs.infura.io:5001/api/v0
NEXT_PUBLIC_THE_GRAPH_IPFS_API=https://api.thegraph.com/ipfs/api/v0

NEXT_PUBLIC_NETWORK_NAME=Mumbai Polygon Testnet
3 changes: 3 additions & 0 deletions classes/Jurisdiction.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { resolveLink } from 'utils/ipfs';

/**
* Class for the jurisdiction.
*/
@@ -7,6 +9,7 @@ export default class Jurisdiction {
this.name = name;
this.uri = uri;
this.uriData = uriData;
this.uriData.image = resolveLink(uriData.image);
this.roles = roles;
this.rules = rules;
this.rulesCount = rulesCount;
5 changes: 4 additions & 1 deletion classes/Profile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { resolveLink } from 'utils/ipfs';

/**
* Class for the profile.
*/
@@ -20,7 +22,8 @@ export default class Profile {
this.owner = owner;
this.uri = uri;
this.uriData = uriData;
this.uriImage = uriImage;
this.uriData.image = resolveLink(uriData.image);
this.uriImage = resolveLink(uriImage);
this.uriFirstName = uriFirstName;
this.uriLastName = uriLastName;
this.reputations = reputations;
4 changes: 3 additions & 1 deletion classes/metadata/AvatarNftMetadata.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { resolveLink } from 'utils/ipfs';

/**
* Class for metadata of avatar nft.
*/
export default class AvatarNftMetadata {
constructor(image, attributes) {
this.image = image;
this.image = resolveLink(image);
this.attributes = attributes;
}
}
4 changes: 3 additions & 1 deletion classes/metadata/JurisdictionMetadata.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { resolveLink } from 'utils/ipfs';

/**
* Class for metadata of jurisdiction.
*/
export default class JurisdictionMetadata {
constructor(image, description) {
this.image = image;
this.image = resolveLink(image);
this.description = description;
}
}
4 changes: 0 additions & 4 deletions components/form/widget/ProfileSelect.js
Original file line number Diff line number Diff line change
@@ -8,11 +8,7 @@ import { useEffect, useMemo, useState } from 'react';
import { formatAddress, formatProfileFirstLastName } from 'utils/formatters';

/**
<<<<<<< HEAD
* A widget to select profile (profile id).
=======
* A widget to select profile (account).
>>>>>>> dev
*/
export default function ProfileSelect(props) {
const propsHeader = props.options?.header;
3 changes: 2 additions & 1 deletion components/jurisdiction/JurisdictionManageDialog.js
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ import {
handleMakeJurisdiction,
handleSetJurisdictionUri,
} from 'utils/analytics';
import { resolveLink } from 'utils/ipfs';

/**
* A dialog for adding a jurisdiction or updating a specified jurisdiction.
@@ -40,7 +41,7 @@ export default function JurisdictionManageDialog({
const [isOpen, setIsOpen] = useState(!isClose);
const [formData, setFormData] = useState({
...(jurisdiction && {
image: jurisdiction.uriData?.image,
image: resolveLink(jurisdiction.uriData?.image),
name: jurisdiction.name,
description: jurisdiction.uriData?.description,
}),
12 changes: 4 additions & 8 deletions hooks/useIpfs.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
import axios from 'axios';
import { create } from 'ipfs-http-client';

const infuraClient = create(process.env.NEXT_PUBLIC_INFURA_IPFS_API);
const theGraphClient = create(process.env.NEXT_PUBLIC_THE_GRAPH_IPFS_API);

export default function useIpfs() {
let uploadFileToIPFS = async function (file) {
const created = await infuraClient.add({
const created = await theGraphClient.add({
path: '',
content: file,
});
const cid = created.path;
const url = `https://ipfs.infura.io/ipfs/${cid}`;
const url = `https://gateway.ipfs.io/ipfs/${cid}`;
return { cid, url };
};

let uploadJsonToIPFS = async function (json) {
// Upload to the graph for usage in graph queries
await theGraphClient.add(JSON.stringify(json));
// Upload to infura
const created = await infuraClient.add(JSON.stringify(json));
const created = await theGraphClient.add(JSON.stringify(json));
const cid = created.path;
const url = `https://ipfs.infura.io/ipfs/${cid}`;
const url = `https://gateway.ipfs.io/ipfs/${cid}`;
return { cid, url };
};

Loading