Skip to content

Commit

Permalink
Adapting the client
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Oct 13, 2023
1 parent 82baf6c commit 7b35ed1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/test/integration-testing/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe("PluginRepo Deployment", function () {
switch (pluginSetupParams.PLUGIN_SETUP_CONTRACT_NAME) {
case SpacePluginSetupParams.PLUGIN_SETUP_CONTRACT_NAME:
expect(receivedStriMetadata).to.equal(
"ipfs://QmdEAfaFb6iYW4UKE7cnkY3DD3uXdSe2ZnRExjJRbJSfNN",
"ipfs://QmcAUbh4UmhwZp4b7aQf9nkpemhCfTVms2eSVng1bZUmmo",
);
break;

Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/test/integration-testing/space-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe("SpacePluginSetup processing", function () {
.prepareInstallation
.inputs,
),
[toHex("ipfs://1234"), pluginUpgrader],
[toHex("ipfs://1234"), ADDRESS_ZERO, pluginUpgrader],
);
const results = await installPlugin(psp, dao, pluginSetupRef, data);

Expand Down
12 changes: 6 additions & 6 deletions packages/contracts/utils/ipfs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BytesLike, ethers } from "ethers";
import { ethers } from "ethers";
import IPFS from "ipfs-http-client";

export async function uploadToIPFS(
Expand All @@ -7,16 +7,16 @@ export async function uploadToIPFS(
): Promise<string> {
const client = IPFS.create({
url: testing
? "https://testing-ipfs-0.aragon.network/api/v0"
: "https://ipfs-0.aragon.network/api/v0",
? "https://test.ipfs.aragon.network/api/v0"
: "https://prod.ipfs.aragon.network/api/v0",
headers: {
"X-API-KEY": "b477RhECf8s8sdM7XrkLBs2wHc4kCMwpbcFC55Kt",
},
});

const cid = await client.add(content);
await client.pin.add(cid.cid);
return cid.path;
const result = await client.add(content);
await client.pin.add(result.cid);
return result.path || result.cid.toString();
}

export function toHex(input: string): string {
Expand Down

0 comments on commit 7b35ed1

Please sign in to comment.