Skip to content

Commit

Permalink
fix(launchpad): after merge, remove change endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
WaDadidou committed Jan 6, 2025
1 parent 738dc5f commit 56afd7f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/launchpad/useGetLaunchpadAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ export const useGetLaunchpadAdmin = () => {

// The Launchapd Admin DAO is the deployer set in the config of the nft-launchpad contract
const config = await nftLaunchpadContractClient.getConfig();
if (!config.launchpad_admin) {
if (!config.admin) {
throw Error("No Launchpad admin set");
}

const adminDaoId = getUserId(selectedNetworkId, config.launchpad_admin);
const adminDaoId = getUserId(selectedNetworkId, config.admin);

return adminDaoId;
} catch (e: any) {
Expand Down
4 changes: 2 additions & 2 deletions packages/hooks/launchpad/useIsUserLaunchpadAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export const useIsUserLaunchpadAdmin = (userId?: string) => {

// The Launchapd Admin DAO is the deployer set in the config of the nft-launchpad contract
const config = await nftLaunchpadContractClient.getConfig();
if (!config.launchpad_admin) {
if (!config.admin) {
throw new Error("No Launchpad admin set");
}

const adminDaoId = getUserId(networkId, config.launchpad_admin);
const adminDaoId = getUserId(networkId, config.admin);
const { isMember } = await daoClient.IsUserDAOMember({
userId,
daoId: adminDaoId,
Expand Down
4 changes: 2 additions & 2 deletions packages/networks/teritori-testnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const cosmwasmNftLaunchpadFeature: CosmWasmNFTLaunchpad = {
type: NetworkFeature.CosmWasmNFTLaunchpad,
launchpadContractAddress:
"tori1te7ku4de0k4rl8lhyuvpmhygaq7k7vy5zpsjq9y638efxsnx3aaqck2utf",
launchpadEndpoint: "http://192.168.10.121:9080",
launchpadEndpoint: "https://dapp-backend.testnet.teritori.com",
nftTr721CodeId: 60,
codeId: 71,
defaultMintDenom: "utori",
Expand Down Expand Up @@ -88,7 +88,7 @@ export const teritoriTestnetNetwork: CosmosNetworkInfo = {
"https://explorer.teritori.com/teritori-testnet/account/$address",
idPrefix: "testori",
testnet: true,
backendEndpoint: "http://192.168.1.78:9090",
backendEndpoint: "https://dapp-backend.testnet.teritori.com",
addressPrefix: "tori",
restEndpoint: "https://rest.testnet.teritori.com",
rpcEndpoint: "https://rpc.testnet.teritori.com",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { FC, useState } from "react";
import { TouchableOpacity, View, ViewStyle } from "react-native";

import { Checkbox } from "./../../../../../../components/Checkbox";

import chevronDownSVG from "@/assets/icons/chevron-down.svg";
import chevronUpSVG from "@/assets/icons/chevron-up.svg";
import { BrandText } from "@/components/BrandText";
Expand All @@ -12,7 +14,6 @@ import { Label } from "@/components/inputs/TextInputCustom";
import { Separator } from "@/components/separators/Separator";
import { SpacerColumn } from "@/components/spacer";
import { useDropdowns } from "@/hooks/useDropdowns";
import { CheckboxDappStore } from "@/screens/DAppStore/components/CheckboxDappStore";
import {
neutral22,
neutral44,
Expand Down Expand Up @@ -139,7 +140,7 @@ export const MultipleSelectInput: FC<Props> = ({
}}
>
<View style={{ flexDirection: "row" }}>
<CheckboxDappStore
<Checkbox
isChecked={items.includes(item)}
style={{ marginRight: layout.spacing_x1 }}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/network-setup/deployNftLaunchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const deployNftLaunchpad = async ({
});
};

const instantiateNftLaunchpad = async (
export const instantiateNftLaunchpad = async (
opts: DeployOpts,
deployerWallet: string,
deployerAddr: string,
Expand Down
7 changes: 4 additions & 3 deletions packages/utils/types/launchpad.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";

import { Collection } from "@/contracts-clients/nft-launchpad";
import { CollectionProject } from "@/contracts-clients/nft-launchpad";
import { DEFAULT_FORM_ERRORS } from "@/utils/errors";
import { isIpfsPathValid } from "@/utils/ipfs";
import {
Expand Down Expand Up @@ -171,7 +171,7 @@ export type CollectionAssetsMetadatasFormValues = z.infer<
typeof ZodCollectionAssetsMetadatasFormValues
>;

// ===== Shapes to build objects from api
// ===== Shapes to build objects received from API
const ZodCoinDataResult = z.object({
amount: z.string(),
denom: z.string(),
Expand Down Expand Up @@ -226,7 +226,8 @@ export type MintPeriodDataResult = z.infer<typeof ZodMintPeriodDataResult>;

export type CollectionDataResult = z.infer<typeof ZodCollectionDataResult>;

// ===== Shapes to build objects to sent to API
export type CollectionToSubmit = Omit<
Collection,
CollectionProject,
"deployed_address" | "base_token_uri" | "owner"
>;

0 comments on commit 56afd7f

Please sign in to comment.