-
-
-
-
-
diff --git a/src/base/projects/View.svelte b/src/base/projects/View.svelte
index 1b35d1c12..23fcb87a3 100644
--- a/src/base/projects/View.svelte
+++ b/src/base/projects/View.svelte
@@ -40,8 +40,8 @@
}
}).then(async (result) => {
const profile = result?.profile;
- const seed = profile?.seed ?? result?.seed;
- const cfg = seed ? config.withSeed(seed) : config;
+ const seedInstance = profile?.seed ?? result?.seed;
+ const cfg = seedInstance ? config.withSeed(seedInstance) : config;
const info = await proj.getInfo(urn, cfg);
projectInfo = info;
const anchors = await getAllAnchors(config, urn, profile?.anchorsAccount ?? org);
@@ -57,7 +57,7 @@
}
peers = await proj.getPeers(urn, cfg);
}
- return { project: info, branches, peers, anchors, config: cfg, profile };
+ return { urn, org, user, seed, peer, project: info, branches, peers, config: cfg, profile, anchors };
});
const parentUrl = (profile: Profile) => {
@@ -179,19 +179,12 @@
{result.project.meta.description}
{#await proj.getTree(urn, getOid(result.project.head, revision, result.branches), "/", config) then tree}
-
-
diff --git a/src/project.ts b/src/project.ts
index a4071b804..9eaa6dd5b 100644
--- a/src/project.ts
+++ b/src/project.ts
@@ -2,6 +2,7 @@ import type { Config } from '@app/config';
import * as api from '@app/api';
import type { CommitsHistory } from '@app/base/projects/Commit/lib';
import { isOid } from '@app/utils';
+import type { Profile } from '@app/profile';
export type Urn = string;
export type Peer = string;
@@ -18,6 +19,21 @@ export interface Project {
};
}
+// Params to render correctly source code related views
+export interface Source {
+ urn: string;
+ org: string;
+ user: string;
+ peer: string;
+ config: Config;
+ project: Info;
+ peers: Peer[];
+ anchors: string[];
+ seed: string;
+ branches: [string, string][];
+ profile?: Profile;
+}
+
export interface PendingProject extends Project {
safeTxHash: string; // Safe transaction hash.
confirmations: string[]; // Owner addresses who have confirmed.