diff --git a/.dockerignore b/.dockerignore index 222169129..a9e9df47c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,23 +8,12 @@ **/.env.*.local **/.env.*.test -apps/deploy-web/.env -apps/deploy-web/.env.* - -apps/indexer/.env -apps/indexer/.env.* - -apps/landing/.env -apps/landing/.env.* - -apps/provider-console/.env -apps/provider-console/.env.* - -apps/provider-proxy/.env -apps/provider-proxy/.env.* - -apps/stats-web/.env -apps/stats-web/.env.* +apps/deploy-web/.env* +apps/indexer/.env* +apps/landing/.env* +apps/provider-console/.env* +apps/provider-proxy/.env* +apps/stats-web/.env* **/.next *.md diff --git a/apps/api/env/.env b/apps/api/env/.env index 2422d335b..d75aab71d 100644 --- a/apps/api/env/.env +++ b/apps/api/env/.env @@ -1,8 +1,8 @@ AKASHLYTICS_CORS_WEBSITE_URLS=https://cloudmos.io,https://www.cloudmos.io,http://debug.cloudmos.io,https://deploy.cloudmos.io,https://beta.cloudmos.io,https://stats.akash.network,https://console.akash.network,https://akash.network,https://akash.hooman.digital,http://localhost:3000,https://beta2.cloudmos.io,https://beta3.cloudmos.io,https://akashconsole.vercel.app WebsiteUrl=https://cloudmos.io -TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT=6000000 -DEPLOYMENT_ALLOWANCE_REFILL_AMOUNT=6000000 -DEPLOYMENT_ALLOWANCE_REFILL_THRESHOLD=600000 +TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT=10000000 +DEPLOYMENT_ALLOWANCE_REFILL_AMOUNT=10000000 +DEPLOYMENT_ALLOWANCE_REFILL_THRESHOLD=1000000 TRIAL_FEES_ALLOWANCE_AMOUNT=1000000 FEE_ALLOWANCE_REFILL_AMOUNT=1000000 FEE_ALLOWANCE_REFILL_THRESHOLD=100000 diff --git a/apps/deploy-web/src/components/deployments/DeploymentDetail.tsx b/apps/deploy-web/src/components/deployments/DeploymentDetail.tsx index a86bcd08c..aea0f148a 100644 --- a/apps/deploy-web/src/components/deployments/DeploymentDetail.tsx +++ b/apps/deploy-web/src/components/deployments/DeploymentDetail.tsx @@ -41,7 +41,6 @@ export function DeploymentDetail({ dseq }: React.PropsWithChildren<{ dseq: strin refetch: getDeploymentDetail, error: deploymentError } = useDeploymentDetail(address, dseq, { - enabled: false, onSuccess: _deploymentDetail => { if (_deploymentDetail) { getLeases(); diff --git a/apps/deploy-web/src/components/deployments/DeploymentDetailTopBar.tsx b/apps/deploy-web/src/components/deployments/DeploymentDetailTopBar.tsx index 986fa5fa0..fd7614892 100644 --- a/apps/deploy-web/src/components/deployments/DeploymentDetailTopBar.tsx +++ b/apps/deploy-web/src/components/deployments/DeploymentDetailTopBar.tsx @@ -33,6 +33,7 @@ export const DeploymentDetailTopBar: React.FunctionComponent = ({ address const storageDeploymentData = getDeploymentData(deployment?.dseq); const deploymentName = getDeploymentName(deployment?.dseq); const previousRoute = usePreviousRoute(); + const wallet = useWallet(); function handleBackClick() { if (previousRoute) { @@ -117,9 +118,11 @@ export const DeploymentDetailTopBar: React.FunctionComponent = ({ address - + {!wallet.isManaged && ( + + )} )} diff --git a/apps/deploy-web/src/components/deployments/DeploymentListRow.tsx b/apps/deploy-web/src/components/deployments/DeploymentListRow.tsx index b77ce5d5f..8ff42c69b 100644 --- a/apps/deploy-web/src/components/deployments/DeploymentListRow.tsx +++ b/apps/deploy-web/src/components/deployments/DeploymentListRow.tsx @@ -53,7 +53,7 @@ export const DeploymentListRow: React.FunctionComponent = ({ deployment, const [open, setOpen] = useState(false); const [isDepositingDeployment, setIsDepositingDeployment] = useState(false); const { changeDeploymentName, getDeploymentData } = useLocalNotes(); - const { address, signAndBroadcastTx } = useWallet(); + const { address, signAndBroadcastTx, isManaged: isManagedWallet } = useWallet(); const isActive = deployment.state === "active"; const { data: leases, isLoading: isLoadingLeases } = useAllLeases(address, { enabled: !!deployment && isActive }); const filteredLeases = leases?.filter(l => l.dseq === deployment.dseq); @@ -194,9 +194,13 @@ export const DeploymentListRow: React.FunctionComponent = ({ deployment, title={ <> Your deployment will close soon,{" "} - - Add Funds - {" "} + {isManagedWallet ? ( + "Add funds" + ) : ( + + Add Funds + + )}{" "} to keep it running. } @@ -306,7 +310,7 @@ export const DeploymentListRow: React.FunctionComponent = ({ deployment, > setOpen(false)}>
- {isActive && ( + {isActive && !isManagedWallet && ( }> Add funds diff --git a/apps/deploy-web/src/components/deployments/ManifestUpdate.tsx b/apps/deploy-web/src/components/deployments/ManifestUpdate.tsx index ee989337b..a14b02e81 100644 --- a/apps/deploy-web/src/components/deployments/ManifestUpdate.tsx +++ b/apps/deploy-web/src/components/deployments/ManifestUpdate.tsx @@ -38,7 +38,7 @@ export const ManifestUpdate: React.FunctionComponent = ({ deployment, lea const [isSendingManifest, setIsSendingManifest] = useState(false); const [showOutsideDeploymentMessage, setShowOutsideDeploymentMessage] = useState(false); const { settings } = useSettings(); - const { address, signAndBroadcastTx } = useWallet(); + const { address, signAndBroadcastTx, isManaged: isManagedWallet } = useWallet(); const { data: providers } = useProviderList(); const { localCert, isLocalCertMatching, createCertificate, isCreatingCert } = useCertificate(); const { enqueueSnackbar, closeSnackbar } = useSnackbar(); @@ -139,10 +139,12 @@ export const ManifestUpdate: React.FunctionComponent = ({ deployment, lea saveDeploymentManifest(dd.deploymentId.dseq, editedManifest, dd.version, address); - sendManifestKey = enqueueSnackbar(, { - variant: "info", - autoHideDuration: null - }); + sendManifestKey = + !isManagedWallet && + enqueueSnackbar(, { + variant: "info", + autoHideDuration: null + }); const leaseProviders = leases.map(lease => lease.provider).filter((v, i, s) => s.indexOf(v) === i); @@ -158,14 +160,19 @@ export const ManifestUpdate: React.FunctionComponent = ({ deployment, lea setIsSendingManifest(false); - closeSnackbar(sendManifestKey); + if (sendManifestKey) { + closeSnackbar(sendManifestKey); + } closeManifestEditor(); } } catch (error) { console.error(error); setIsSendingManifest(false); - closeSnackbar(sendManifestKey); + + if (sendManifestKey) { + closeSnackbar(sendManifestKey); + } } } diff --git a/apps/deploy-web/src/components/get-started/GetStartedStepper.tsx b/apps/deploy-web/src/components/get-started/GetStartedStepper.tsx index 61cd5919d..c511c3085 100644 --- a/apps/deploy-web/src/components/get-started/GetStartedStepper.tsx +++ b/apps/deploy-web/src/components/get-started/GetStartedStepper.tsx @@ -1,15 +1,17 @@ "use client"; -import { useEffect, useState } from "react"; +import React, { useEffect, useState } from "react"; import { MdRestartAlt } from "react-icons/md"; import { Button, buttonVariants, CustomTooltip, Spinner } from "@akashnetwork/ui/components"; import Step from "@mui/material/Step"; import StepContent from "@mui/material/StepContent"; import StepLabel from "@mui/material/StepLabel"; import Stepper from "@mui/material/Stepper"; -import { Check, Rocket, WarningCircle, XmarkCircleSolid } from "iconoir-react"; +import { Check, CreditCard, Rocket, WarningCircle, XmarkCircleSolid } from "iconoir-react"; import dynamic from "next/dynamic"; import Link from "next/link"; +import { ConnectManagedWalletButton } from "@src/components/wallet/ConnectManagedWalletButton"; +import { envConfig } from "@src/config/env.config"; import { useChainParam } from "@src/context/ChainParamProvider"; import { useWallet } from "@src/context/WalletProvider"; import { RouteStepKeys } from "@src/utils/constants"; @@ -45,7 +47,7 @@ const LiquidityModal = dynamic( export const GetStartedStepper: React.FunctionComponent = () => { const [activeStep, setActiveStep] = useState(0); - const { isWalletConnected, walletBalances, address, refreshBalances } = useWallet(); + const { isWalletConnected, walletBalances, address, refreshBalances, isManaged: isManagedWallet, isTrialing } = useWallet(); const { minDeposit } = useChainParam(); const aktBalance = walletBalances ? uaktToAKT(walletBalances.uakt) : 0; const usdcBalance = walletBalances ? udenomToDenom(walletBalances.usdc) : 0; @@ -88,41 +90,73 @@ export const GetStartedStepper: React.FunctionComponent = () => { onClick={() => (activeStep > 0 ? onStepClick(0) : null)} classes={{ label: cn("text-xl tracking-tight", { ["cursor-pointer hover:text-primary"]: activeStep > 0, ["!font-bold"]: activeStep === 0 }) }} > - Wallet + {envConfig.NEXT_PUBLIC_BILLING_ENABLED ? "Trial / Billing" : "Billing"} -

- You need at least {minDeposit.akt} AKT or {minDeposit.usdc} USDC in your wallet to deploy on Akash. If you don't have {minDeposit.akt} AKT or{" "} - {minDeposit.usdc} USDC, you can switch to the sandbox or ask help in our . -

+ {envConfig.NEXT_PUBLIC_BILLING_ENABLED && !isWalletConnected && ( +

+ You can pay using either USD (fiat) or with crypto ($AKT or $USDC). To pay with USD, either click "Start Trial" or "Add Credit Card". To pay with + crypto, click "Connect Wallet" +

+ )} + + {isWalletConnected && !isManagedWallet && ( +
+ + Wallet is installed{" "} +
+ )} + + {!isManagedWallet && ( +

+ You need at least {minDeposit.akt} AKT or {minDeposit.usdc} USDC in your wallet to deploy on Akash. If you don't have {minDeposit.akt} AKT or{" "} + {minDeposit.usdc} USDC, you can switch to the sandbox or ask help in our . +

+ )}
- - Learn how - + {!isManagedWallet && ( + + Learn how + + )}
-
- - Wallet is installed -
+ {isWalletConnected && isTrialing && ( +
+ + Trialing +
+ )} - {isWalletConnected ? ( + {isWalletConnected && isManagedWallet && !isTrialing && (
- Wallet is connected + Billing is set up
- ) : ( + )} + + {!isWalletConnected && (
- Wallet is not connected + Billing is not set up
+ {envConfig.NEXT_PUBLIC_BILLING_ENABLED && ( + <> + + + + + )}
)} @@ -143,10 +177,16 @@ export const GetStartedStepper: React.FunctionComponent = () => { )} - - You have {aktBalance} AKT and {usdcBalance} USDC - - + {isManagedWallet ? ( + + You have ${usdcBalance} + + ) : ( + + You have {aktBalance} AKT and {usdcBalance} USDC + + )} + {!isManagedWallet && }
)} @@ -156,7 +196,12 @@ export const GetStartedStepper: React.FunctionComponent = () => { onStepClick(1)} - classes={{ label: cn("text-xl tracking-tight", { ["cursor-pointer hover:text-primary"]: activeStep > 1, ["!font-bold"]: activeStep === 1 }) }} + classes={{ + label: cn("text-xl tracking-tight", { + ["cursor-pointer hover:text-primary"]: activeStep > 1, + ["!font-bold"]: activeStep === 1 + }) + }} > Docker container diff --git a/apps/deploy-web/src/components/home/YourAccount.tsx b/apps/deploy-web/src/components/home/YourAccount.tsx index 54711f605..696095532 100644 --- a/apps/deploy-web/src/components/home/YourAccount.tsx +++ b/apps/deploy-web/src/components/home/YourAccount.tsx @@ -8,6 +8,7 @@ import { useAtom } from "jotai"; import Link from "next/link"; import { useTheme } from "next-themes"; +import { envConfig } from "@src/config/env.config"; import { usePricing } from "@src/context/PricingProvider"; import { useWallet } from "@src/context/WalletProvider"; import { useUsdcDenom } from "@src/hooks/useDenom"; @@ -53,7 +54,7 @@ type Props = { export const YourAccount: React.FunctionComponent = ({ balances, isLoadingBalances, activeDeployments, leases, providers }) => { const { resolvedTheme } = useTheme(); const tw = useTailwind(); - const { address } = useWallet(); + const { address, isManaged: isManagedWallet, creditAmount: managedWalletCreditAmount = 0 } = useWallet(); const usdcIbcDenom = useUsdcDenom(); const [selectedDataId, setSelectedDataId] = useState(null); const [costPerMonth, setCostPerMonth] = useState(null); @@ -92,7 +93,7 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin label: "Balance", denom: uAktDenom, denomLabel: "AKT", - value: balances.balance, + value: isManagedWallet && envConfig.NEXT_PUBLIC_MANAGED_WALLET_DENOM === "uakt" ? balances.balance + managedWalletCreditAmount : balances.balance, color: colors.balance_akt }, { @@ -112,7 +113,7 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin label: "Balance", denom: usdcIbcDenom, denomLabel: "USDC", - value: balances.balanceUsdc, + value: isManagedWallet && envConfig.NEXT_PUBLIC_MANAGED_WALLET_DENOM === "usdc" ? balances.balanceUsdc + managedWalletCreditAmount : balances.balance, color: colors.balance_usdc }, { @@ -125,8 +126,8 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin } ]; }; - const aktData = balances ? getAktData(balances, escrowUAktSum) : []; - const usdcData = balances ? getUsdcData(balances, escrowUsdcSum) : []; + const aktData = balances && (!isManagedWallet || envConfig.NEXT_PUBLIC_MANAGED_WALLET_DENOM === "uakt") ? getAktData(balances, escrowUAktSum) : []; + const usdcData = balances && (!isManagedWallet || envConfig.NEXT_PUBLIC_MANAGED_WALLET_DENOM === "usdc") ? getUsdcData(balances, escrowUsdcSum) : []; const filteredAktData = aktData.filter(x => x.value); const filteredUsdcData = usdcData.filter(x => x.value); const allData = [...aktData, ...usdcData]; @@ -256,7 +257,7 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin {hasBalance && (
{filteredAktData.length > 0 && } - {filteredUsdcData.length > 0 && } + {filteredUsdcData.length > 0 && }
)} @@ -271,9 +272,11 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin >
{balance.label}
-
- {udenomToDenom(balance.value, 2)} {balance.denomLabel} -
+ {!isManagedWallet && ( +
+ {udenomToDenom(balance.value, 2)} {balance.denomLabel} +
+ )}
@@ -284,9 +287,11 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin
Total
-
- {uaktToAKT(totalUAkt, 2)} AKT -
+ {!isManagedWallet && ( +
+ {uaktToAKT(totalUAkt, 2)} AKT +
+ )}
@@ -297,9 +302,11 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin
-
- {udenomToDenom(totalUsdc, 2)} USDC -
+ {!isManagedWallet && ( +
+ {udenomToDenom(totalUsdc, 2)} USDC +
+ )}
@@ -311,7 +318,7 @@ export const YourAccount: React.FunctionComponent = ({ balances, isLoadin
-
+ {!isManagedWallet &&
}
diff --git a/apps/deploy-web/src/components/new-deployment/CreateLease.tsx b/apps/deploy-web/src/components/new-deployment/CreateLease.tsx index cee3d2419..3cc7b4213 100644 --- a/apps/deploy-web/src/components/new-deployment/CreateLease.tsx +++ b/apps/deploy-web/src/components/new-deployment/CreateLease.tsx @@ -87,6 +87,7 @@ export const CreateLease: React.FunctionComponent = ({ dseq }) => { const dseqList = Object.keys(groupedBids).map(g => parseInt(g)); const allClosed = (bids?.length || 0) > 0 && bids?.every(bid => bid.state === "closed"); const { enqueueSnackbar, closeSnackbar } = useSnackbar(); + const wallet = useWallet(); useEffect(() => { getDeploymentDetail(); @@ -167,10 +168,12 @@ export const CreateLease: React.FunctionComponent = ({ dseq }) => { const localDeploymentData = getDeploymentLocalData(dseq); if (localDeploymentData && localDeploymentData.manifest) { // Send the manifest - const sendManifestKey = enqueueSnackbar(, { - variant: "info", - autoHideDuration: null - }); + const sendManifestNotification = + !wallet.isManaged && + enqueueSnackbar(, { + variant: "info", + autoHideDuration: null + }); try { const yamlJson = yaml.load(localDeploymentData.manifest); @@ -184,7 +187,10 @@ export const CreateLease: React.FunctionComponent = ({ dseq }) => { } catch (err) { console.error(err); } - closeSnackbar(sendManifestKey); + + if (sendManifestNotification) { + closeSnackbar(sendManifestNotification); + } } event(AnalyticsEvents.SEND_MANIFEST, { diff --git a/apps/deploy-web/src/components/user/AddressBookTable.tsx b/apps/deploy-web/src/components/user/AddressBookTable.tsx index b5576ba09..c4eb743c5 100644 --- a/apps/deploy-web/src/components/user/AddressBookTable.tsx +++ b/apps/deploy-web/src/components/user/AddressBookTable.tsx @@ -19,79 +19,77 @@ export const AddressBookTable: React.FunctionComponent = () => { return ( - {user?.username && user?.bio && ( - - - - {(isLoading || isLoadingAddressBook) && ( -
- -
- )} + + + + {(isLoading || isLoadingAddressBook) && ( +
+ +
+ )} - {!isLoading && addressNamesArray?.length === 0 && ( -
-

No saved addresses.

-
- )} + {!isLoading && addressNamesArray?.length === 0 && ( +
+

No saved addresses.

+
+ )} - {addressNamesArray.length > 0 && ( - - - - Address - Name - - - + {addressNamesArray.length > 0 && ( +
+ + + Address + Name + + + - - {addressNamesArray.map(({ address, name }) => ( - - - - - {name} - - - - - ))} - -
- )} + + {addressNamesArray.map(({ address, name }) => ( + + + + + {name} + + + + + ))} + + + )} - {!isLoading && !isLoadingAddressBook && ( - - )} -
-
-
- )} + {!isLoading && !isLoadingAddressBook && ( + + )} +
+
+
); }; diff --git a/apps/deploy-web/src/components/user/UserFavorites.tsx b/apps/deploy-web/src/components/user/UserFavorites.tsx index e285542f8..4dc8755bf 100644 --- a/apps/deploy-web/src/components/user/UserFavorites.tsx +++ b/apps/deploy-web/src/components/user/UserFavorites.tsx @@ -16,36 +16,34 @@ export const UserFavorites: React.FunctionComponent = () => { return ( - {user?.username && user?.bio && ( - - {isLoadingTemplates && ( -
- + + {isLoadingTemplates && ( +
+ +
+ )} + +
+ {!isLoadingTemplates && favoriteTemplates?.length === 0 && ( +
+

No template favorites.

)} -
- {!isLoadingTemplates && favoriteTemplates?.length === 0 && ( -
-

No template favorites.

-
- )} - - {favoriteTemplates?.map(t => ( - { - event(AnalyticsEvents.USER_PROFILE_CLICK_TEMPLATE, { - category: "profile", - label: "Click on template from templates" - }); - }} - /> - ))} -
- - )} + {favoriteTemplates?.map(t => ( + { + event(AnalyticsEvents.USER_PROFILE_CLICK_TEMPLATE, { + category: "profile", + label: "Click on template from templates" + }); + }} + /> + ))} +
+
); }; diff --git a/apps/deploy-web/src/components/user/UserProfileLayout.tsx b/apps/deploy-web/src/components/user/UserProfileLayout.tsx index 6be164988..6307f58e5 100644 --- a/apps/deploy-web/src/components/user/UserProfileLayout.tsx +++ b/apps/deploy-web/src/components/user/UserProfileLayout.tsx @@ -10,13 +10,13 @@ import { UrlService } from "@src/utils/urlUtils"; type UserProfileTab = "templates" | "favorites" | "address-book" | "settings"; type Props = { - username: string; - bio: string; + username?: string; + bio?: string; children?: ReactNode; page: UserProfileTab; }; -export const UserProfileLayout: React.FunctionComponent = ({ page, children, username, bio }) => { +export const UserProfileLayout: React.FunctionComponent = ({ page, children, username = "", bio }) => { const router = useRouter(); const { user } = useCustomUser(); diff --git a/apps/deploy-web/src/components/user/UserSettingsForm.tsx b/apps/deploy-web/src/components/user/UserSettingsForm.tsx index 835a2fa98..39e46690b 100644 --- a/apps/deploy-web/src/components/user/UserSettingsForm.tsx +++ b/apps/deploy-web/src/components/user/UserSettingsForm.tsx @@ -97,103 +97,101 @@ export const UserSettingsForm: RequiredUserConsumer = ({ user }) => { return ( - {user?.username && user?.bio && ( - - -
- - - -
- { - return ; - }} - /> - {isCheckingAvailability && } - - {!isCheckingAvailability && isAvailable && ( - <> - -  Username is available - - )} - {!isCheckingAvailability && isAvailable === false && ( - <> - -  Username is not available - - )} - -
- {errors.username && ( - - {errors.username.message} - - )} - - } - /> - + + + + +
- } + render={({ field }) => { + return ; + }} /> + {isCheckingAvailability && } + + {!isCheckingAvailability && isAvailable && ( + <> + +  Username is available + + )} + {!isCheckingAvailability && isAvailable === false && ( + <> + +  Username is not available + + )} +
- } - /> - } /> - - ( - https://www.youtube.com/c/
} /> - )} - /> - } - /> - + {errors.username.message} + + )} + + } + /> + + https://x.com/
} />} + render={({ field }) => } /> - } - /> - https://github.com/
} />} - /> - } - /> +
+ } + /> + } /> + + ( + https://www.youtube.com/c/
} /> + )} + /> + } + /> + https://x.com/
} />} + /> + } + /> + https://github.com/
} />} + /> + } + /> - - - - - - )} + + + + + ); }; diff --git a/apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx b/apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx index 80fb1f3ff..b4ae00b66 100644 --- a/apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx +++ b/apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx @@ -57,6 +57,7 @@ type ContextType = { isManaged: boolean; isWalletLoading: boolean; isTrialing: boolean; + creditAmount?: number; }; const WalletProviderContext = React.createContext({} as ContextType); @@ -350,7 +351,8 @@ export const WalletProvider = ({ children }) => { refreshBalances, isManaged: !!managedWallet, isWalletLoading: isLoading, - isTrialing: !!managedWallet?.isTrialing + isTrialing: !!managedWallet?.isTrialing, + creditAmount: managedWallet?.creditAmount }} > {children} diff --git a/apps/deploy-web/src/hooks/useManagedWallet.ts b/apps/deploy-web/src/hooks/useManagedWallet.ts index ef7cc15e0..f68f1de2f 100644 --- a/apps/deploy-web/src/hooks/useManagedWallet.ts +++ b/apps/deploy-web/src/hooks/useManagedWallet.ts @@ -32,7 +32,7 @@ export const useManagedWallet = () => { } }, [isFetched, isCreated, wallet]); - useWhen(created && NEXT_PUBLIC_MANAGED_WALLET_NETWORK_ID && selectedNetworkId !== NEXT_PUBLIC_MANAGED_WALLET_NETWORK_ID, () => { + useWhen(wallet && NEXT_PUBLIC_MANAGED_WALLET_NETWORK_ID && selectedNetworkId !== NEXT_PUBLIC_MANAGED_WALLET_NETWORK_ID, () => { setSelectedNetworkId(NEXT_PUBLIC_MANAGED_WALLET_NETWORK_ID); }); diff --git a/apps/deploy-web/src/queries/useGrantsQuery.ts b/apps/deploy-web/src/queries/useGrantsQuery.ts index 7ffa332d9..0a94f1cdc 100644 --- a/apps/deploy-web/src/queries/useGrantsQuery.ts +++ b/apps/deploy-web/src/queries/useGrantsQuery.ts @@ -7,7 +7,7 @@ import { ApiUrlService } from "@src/utils/apiUtils"; import { QueryKeys } from "./queryKeys"; async function getGranterGrants(apiEndpoint: string, address: string) { - if (!address) return []; + if (!address || !apiEndpoint) return []; const response = await axios.get(ApiUrlService.granterGrants(apiEndpoint, address)); const filteredGrants = response.data.grants.filter( @@ -26,7 +26,7 @@ export function useGranterGrants(address: string, options = {}) { } async function getGranteeGrants(apiEndpoint: string, address: string) { - if (!address) return []; + if (!address || !apiEndpoint) return []; const response = await axios.get(ApiUrlService.granteeGrants(apiEndpoint, address)); const filteredGrants = response.data.grants.filter( @@ -47,7 +47,7 @@ export function useGranteeGrants(address: string, options = {}) { } async function getAllowancesIssued(apiEndpoint: string, address: string) { - if (!address) return []; + if (!address || !apiEndpoint) return []; const response = await axios.get(ApiUrlService.allowancesIssued(apiEndpoint, address)); @@ -61,7 +61,7 @@ export function useAllowancesIssued(address: string, options = {}) { } async function getAllowancesGranted(apiEndpoint: string, address: string) { - if (!address) return []; + if (!address || !apiEndpoint) return []; const response = await axios.get(ApiUrlService.allowancesGranted(apiEndpoint, address)); diff --git a/docker/Dockerfile.node b/docker/Dockerfile.node index b3568128d..77746ee55 100644 --- a/docker/Dockerfile.node +++ b/docker/Dockerfile.node @@ -31,7 +31,7 @@ RUN addgroup --system --gid $APP_GROUP_ID $APP_GROUP \ && adduser --system --uid $APP_GROUP_ID --ingroup $APP_GROUP $APP_USER COPY --from=builder /app/$WORKSPACE/dist /app/$WORKSPACE/dist -COPY --from=builder /app/$WORKSPACE/.env* /app/$WORKSPACE +COPY --from=builder /app/$WORKSPACE/env/* /app/$WORKSPACE/env/ COPY --from=builder /app/packages /app/packages COPY --from=builder /app/package.json /app/package.json COPY --from=builder /app/package-lock.json /app/package-lock.json