Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Aug 26, 2024
1 parent df4e0fb commit c5968ef
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dapp/src/components/Commit.astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import Loading from "./Loading.astro";
</div>

<script>
import {commitHash} from "./project";
import { commitHash } from "./project";

const commit_hash = document.getElementById(
"commit_hash",
Expand Down
14 changes: 8 additions & 6 deletions dapp/src/components/RegisterProject.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const SOROBAN_DOMAIN_CONTRACT_ID = import.meta.env.SOROBAN_DOMAIN_CONTRACT_ID;
>
<div class="row items-center py-12 px-4 md:px-20 md:w-8/12 md:py-10">
<div class="space-y-8 md:w-full">

<label class="block mb-2 text-base font-medium text-black">
Maintainers
<input
Expand Down Expand Up @@ -72,15 +71,13 @@ const SOROBAN_DOMAIN_CONTRACT_ID = import.meta.env.SOROBAN_DOMAIN_CONTRACT_ID;
</div>

<script>
import {registerProject} from "./project";
import { registerProject } from "./project";

const maintainers = document.getElementById(
"maintainers",
) as HTMLInputElement;

const config_url = document.getElementById(
"config_url",
) as HTMLInputElement;
const config_url = document.getElementById("config_url") as HTMLInputElement;
const config_hash = document.getElementById(
"config_hash",
) as HTMLInputElement;
Expand All @@ -99,7 +96,12 @@ const SOROBAN_DOMAIN_CONTRACT_ID = import.meta.env.SOROBAN_DOMAIN_CONTRACT_ID;
wrap_loader.style.display = "block";
wrap_button.style.display = "none";
try {
const register_status = await registerProject(maintainers.value, config_url.value, config_hash.value, "CDODLZIO3OY5ZBCNYQALDZWLW2NN533WIDZUDNW2NRWJGLTWSABGSMH7");
const register_status = await registerProject(
maintainers.value,
config_url.value,
config_hash.value,
"CDODLZIO3OY5ZBCNYQALDZWLW2NN533WIDZUDNW2NRWJGLTWSABGSMH7",
);

wrap_loader.style.display = "none";
wrap_button.style.display = "block";
Expand Down
3 changes: 1 addition & 2 deletions dapp/src/components/SetProject.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ const TANSU_CONTRACT_ID = import.meta.env.TANSU_CONTRACT_ID;
/>
</div>


<script>
import {setProjectId} from "./project";
import { setProjectId } from "./project";

const wrap_button = document.getElementById(
"wrap-set-project-button",
Expand Down
15 changes: 13 additions & 2 deletions dapp/src/components/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ async function commitHash(commit_hash: string): Promise<boolean> {
}
}

async function registerProject(maintainers: string, config_url: string, config_hash: string, domain_contract_id: string): Promise<boolean> {
async function registerProject(
maintainers: string,
config_url: string,
config_hash: string,
domain_contract_id: string,
): Promise<boolean> {
if (!projectState.project_id) {
alert("No project defined");
return false;
Expand Down Expand Up @@ -109,4 +114,10 @@ async function registerProject(maintainers: string, config_url: string, config_h
}
}

export { commitHash, getProjectHash, loadedProjectId, registerProject, setProjectId };
export {
commitHash,
getProjectHash,
loadedProjectId,
registerProject,
setProjectId,
};

0 comments on commit c5968ef

Please sign in to comment.