Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update imports to use roblox-sdk dependency #868

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/react-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@bosonprotocol/core-sdk": "^1.42.0-alpha.2",
"@bosonprotocol/ethers-sdk": "^1.15.1-alpha.8",
"@bosonprotocol/ipfs-storage": "^1.12.0",
"@bosonprotocol/roblox-sdk": "^1.0.0-alpha.11",
"@davatar/react": "1.11.1",
"@ethersproject/units": "5.6.0",
"@glidejs/glide": "3.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { useCookies } from "react-cookie";
import {
ROBLOX_OAUTH_COOKIE_NAME,
WEB3AUTH_COOKIE_NAME
} from "../../../../hooks/roblox/backend.const";
} from "@bosonprotocol/roblox-sdk";
import { useRobloxProducts } from "../../../../hooks/roblox/useRobloxProducts";
import { useRobloxExchanges } from "../../../../hooks/roblox/useRobloxExchanges";
import { LoginWithRoblox } from "./LoginWithRoblox";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { RobloxExchangesGrid } from "./RobloxExchangesGrid";
import {
BosonRobloxExchange,
ProductAvailabilityStatus
} from "../../../../hooks/roblox/backend.types";
} from "@bosonprotocol/roblox-sdk";
import { CancelExchange } from "../../../modal/components/Redeem/ExchangeView/cancellation/CancelExchange";
import NonModal from "../../../modal/nonModal/NonModal";
import { useIsRobloxLoggedIn } from "../../../../hooks/roblox/useIsRobloxLoggedIn";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { isBundle, isProductV1 } from "../../../../lib/offer/filter";
import { ProductCardSkeleton } from "../../../skeleton/ProductCardSkeleton";
import { ProductType } from "../../../productCard/const";
import { ConnectWalletWithLogic } from "./ConnectWalletWithLogic";
import { BosonRobloxExchange } from "../../../../hooks/roblox/backend.types";
import { BosonRobloxExchange } from "@bosonprotocol/roblox-sdk";
import { Typography } from "../../../ui/Typography";
import { isTruthy } from "../../../../types/helpers";
import { ExchangeCard } from "../../../exchangeCard/ExchangeCard";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import {
getImageUrl
} from "../../../../lib/images/images";
import { getOfferDetails } from "../../../../lib/offer/getOfferDetails";
import { isBundle, isProductV1 } from "../../../../lib/offer/filter";
import { Bundle, isBundle, isProductV1 } from "../../../../lib/offer/filter";
import { ProductCardSkeleton } from "../../../skeleton/ProductCardSkeleton";
import { ProductType } from "../../../productCard/const";
import { ConnectWalletWithLogic } from "./ConnectWalletWithLogic";
import { BosonRobloxProductWithAvailability } from "../../../../hooks/roblox/backend.types";
import { BosonRobloxProductWithAvailability } from "@bosonprotocol/roblox-sdk";
import { Typography } from "../../../ui/Typography";
import { isTruthy } from "../../../../types/helpers";
import { LoginWithRoblox } from "./LoginWithRoblox";
Expand Down Expand Up @@ -83,7 +83,13 @@ export const RobloxProductsGrid = ({
if (!(isProductV1(offer) || isBundle(offer))) {
return null;
}
const bundleUuid = isBundle(offer) ? offer.metadata.bundleUuid : "";
// if(isProductV1(offer)){
// offer.metadata
// }
const bundleUuid = isBundle(offer)
? // TODO: remove cast once @bosonprotocol/roblox-sdk uses the same version of @bosonprotocol/core-sdk that we use
(offer as Bundle).metadata.bundleUuid
: "";

const { mainImage } = getOfferDetails(offer);
const imageOptimizationOptions = {
Expand Down
3 changes: 0 additions & 3 deletions packages/react-kit/src/hooks/roblox/backend.const.ts

This file was deleted.

81 changes: 0 additions & 81 deletions packages/react-kit/src/hooks/roblox/backend.types.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery, useQueryClient } from "react-query";
import { useRobloxConfigContext } from "./context/useRobloxConfigContext";
import { mutationKeys } from "./mutationKeys";
import { GetWalletAuthResponse } from "./backend.types";
import { GetWalletAuthResponse } from "@bosonprotocol/roblox-sdk";
type UseGetRobloxWalletAuthProps = {
sellerId: string;
options: { enabled: boolean };
Expand Down
2 changes: 1 addition & 1 deletion packages/react-kit/src/hooks/roblox/useIsRobloxLoggedIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useRobloxLocalStorage } from "./useRobloxLocalStorage";
import { robloxQueryKeys } from "./const";
import { useRobloxConfigContext } from "./context/useRobloxConfigContext";
import { mutationKeys } from "./mutationKeys";
import { GetLoggedInResponse } from "./backend.types";
import { GetLoggedInResponse } from "@bosonprotocol/roblox-sdk";

type UseIsRobloxLoggedInProps = {
sellerId: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { formatBytes32String } from "ethers/lib/utils";
import { useAccount, useWeb3SignTypedData } from "../connection/connection";
import { GetLoggedInResponse } from "./backend.types";
import { GetLoggedInResponse } from "@bosonprotocol/roblox-sdk";
import { useMutation } from "react-query";
import { useDisconnect } from "../connection/useDisconnect";
import { usePostRobloxWalletAuth } from "./usePostRobloxWalletAuth";
Expand Down
2 changes: 1 addition & 1 deletion packages/react-kit/src/hooks/roblox/useRobloxExchanges.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from "react-query";
import { GetExchangesResponse } from "./backend.types";
import { GetExchangesResponse } from "@bosonprotocol/roblox-sdk";
import { useRobloxConfigContext } from "./context/useRobloxConfigContext";

type UseRobloxProductsProps = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useLocalStorage } from "../storage/useLocalStorage";
import { GetLoggedInResponse } from "./backend.types";
import { GetLoggedInResponse } from "@bosonprotocol/roblox-sdk";
import { robloxLocalStorageKey } from "./const";

export const useRobloxLocalStorage = () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-kit/src/hooks/roblox/useRobloxProducts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery, useQueryClient } from "react-query";
import { GetProductsResponse } from "./backend.types";
import { GetProductsResponse } from "@bosonprotocol/roblox-sdk";
import { useRobloxConfigContext } from "./context/useRobloxConfigContext";
import { mutationKeys } from "./mutationKeys";

Expand Down
Loading