Skip to content

Commit

Permalink
first working version with sveltekit build
Browse files Browse the repository at this point in the history
  • Loading branch information
zapaz committed Feb 1, 2024
1 parent d9fdf2f commit da921e3
Show file tree
Hide file tree
Showing 236 changed files with 218 additions and 13,582 deletions.
19 changes: 0 additions & 19 deletions .vscode/launch.json

This file was deleted.

4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"group": "Default"
}
],
"liveServer.settings.root": "/web/",
"phpsab.autoRulesetSearch": false,
"phpsab.composerJsonPath": "wordpress/composer.json",
"phpsab.debug": true,
Expand All @@ -85,5 +84,6 @@
"workbench.layoutControl.enabled": true,
"workbench.statusBar.visible": true,
"favorites.sortOrder": "DESC",
"workbench.preferredLightColorTheme": "Kimbie Dark"
"workbench.preferredLightColorTheme": "Kimbie Dark",
"liveServer.settings.root": "/web/dapp/"
}
2 changes: 1 addition & 1 deletion common/lib/apis/api-covalent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BigNumber, constants } from "ethers";
import { BigNumber } from "ethers";

import type { FetchResponse } from "@kredeum/common/lib/common/fetch";
import type { CollectionFilterType, CollectionType, NftType } from "@kredeum/common/lib/common/types";
Expand Down
2 changes: 1 addition & 1 deletion common/lib/collection/collection-clone.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TransactionResponse, TransactionReceipt } from "@ethersproject/providers";
import type { BigNumberish } from "ethers";
import { utils, constants } from "ethers";
import { utils } from "ethers";

import { ADDRESS_ZERO, explorerTxLog } from "@kredeum/common/lib/common/config";
import { factoryGetContract } from "@kredeum/common/lib/common/factory-get";
Expand Down
2 changes: 1 addition & 1 deletion common/lib/collection/collection-get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Contract, Signer, constants } from "ethers";
import { Contract, Signer } from "ethers";

import type { CollectionType } from "@kredeum/common/lib/common/types";
import type { JsonFragment } from "@ethersproject/abi";
Expand Down
2 changes: 1 addition & 1 deletion common/lib/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const tokenIdSplit = (tokenIDs = ""): Array<string> => {
return tokenIDsArray;
};
const tokenIdCount = (tokenIDs: string): number => (tokenIDs === "" ? -1 : tokenIdSplit(tokenIDs).length);
const tokenIdSelected = (tokenIDs: string, tokenID: string): boolean =>
const tokenIdSelected = (tokenID: string, tokenIDs?: string): boolean =>
!tokenIDs || tokenIdSplit(tokenIDs).includes(tokenID);

const isCollection = (refHash: RefPageType) => networks.has(refHash.chainId) && isAddressNotZero(refHash.address);
Expand Down
2 changes: 1 addition & 1 deletion common/lib/common/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const localStorageDefined = (): boolean => typeof localStorage !== "undefined";

const _localStorage = localStorageDefined() ? localStorage : null;

const localStorageGet = (field: string): string | null => _localStorage?.getItem(field) || null;
const localStorageGet = (field: string): string => _localStorage?.getItem(field) || "";

const localStorageSet = (field: string, value: string): void => _localStorage?.setItem(field, value);

Expand Down
4 changes: 2 additions & 2 deletions common/lib/nft/nft-get-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const nftGetImageLink = (nft: NftType): string =>
const nftGetContentType = async (nft: NftType): Promise<string> => {
// console.log("nftGetContentType", nft);

const { chainId, address, tokenID } = nft || {};
const { chainId, address, tokenID } = nft;
const url = nftGetImageLink(nft);

let contentType = "text";
Expand All @@ -42,7 +42,7 @@ const nftGetContentType = async (nft: NftType): Promise<string> => {
const nftGetMetadata = async (nft: NftType): Promise<NftType> => {
// console.log("nftGetMetadata", nft);

const { chainId, address, tokenID } = nft || {};
const { chainId, address, tokenID } = nft;
const network = networks.get(chainId);
if (!(chainId && address && address != ADDRESS_ZERO && tokenID && network)) return nft;

Expand Down
8 changes: 4 additions & 4 deletions common/lib/nft/nft-mint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TransactionResponse, TransactionReceipt } from "@ethersproject/providers";
import type { BigNumberish, PayableOverrides } from "ethers";
import { ethers, constants } from "ethers";
import { ethers } from "ethers";

import type { NftType } from "@kredeum/common/lib/common/types";

Expand Down Expand Up @@ -129,16 +129,16 @@ const nftMinted = async (
txResponse: TransactionResponse,
metadataCid: string,
minter: string
): Promise<NftType | null> => {
if (!(chainId && address && address != ADDRESS_ZERO && txResponse && metadataCid && minter)) return null;
): Promise<NftType | undefined> => {
if (!(chainId && address && address != ADDRESS_ZERO && txResponse && metadataCid && minter)) return;

const txReceipt = await txResponse.wait();
// console.log("txReceipt", txReceipt);

const tokenID = _mintTokenID(txReceipt);
// console.log("tokenID", tokenID);

if (!(Number(tokenID) >= 0)) return null;
if (!(Number(tokenID) >= 0)) return;

const nft = await _mintedNft(chainId, address, tokenID, storageLinkToUrlHttp(metadataCid), minter);
// console.log("nftMinted", nft);
Expand Down
2 changes: 1 addition & 1 deletion common/lib/resolver/resolver-conv-collection-infos.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { constants, BigNumber } from "ethers";
import { BigNumber } from "ethers";

import type { IOpenNFTsInfos, IERCNftInfos } from "@kredeum/contracts/types/OpenNFTsResolver";

Expand Down
2 changes: 1 addition & 1 deletion common/lib/resolver/resolver-conv-nft-infos.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BigNumber, constants } from "ethers";
import { BigNumber } from "ethers";

import type { IERCNftInfos, IOpenNFTsInfos } from "@kredeum/contracts/types/IOpenNFTsResolver";
import type { NftType, CollectionType, ReceiverType } from "@kredeum/common/lib/common/types";
Expand Down
2 changes: 1 addition & 1 deletion common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ipld/dag-pb": "^4.0.8",
"@types/findup-sync": "^4.0.4",
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.11.13",
"@types/node": "^20.11.15",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"dotenv": "^16.4.1",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 1 addition & 11 deletions gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,12 @@ function htmls() {
return gulp.src(["html/*"]).pipe(gulp.dest("web/dapp"));
}

// Transpile, concatenate and minify scripts
function scripts() {
return gulp
.src(["js/**/*"])
.pipe(plumber())
.pipe(!production ? uglify().on("error", swallow) : noop())
.pipe(gulp.dest("web/dapp/assets/js/"));
}

// Watch files
function watchFiles() {
gulp.watch("scss/**/*", css);
gulp.watch("js/**/*", gulp.series(scripts));
}

const build = gulp.series(clean, gulp.parallel(css, images, scripts, htmls), fonts);
const build = gulp.series(clean, gulp.parallel(css, images, htmls), fonts);
const watch = gulp.parallel(watchFiles);

exports.images = images;
Expand Down
197 changes: 0 additions & 197 deletions gulp/html/connexion.html

This file was deleted.

Loading

0 comments on commit da921e3

Please sign in to comment.