Skip to content
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"@chakra-ui/react": "^2.1.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@thirdweb-dev/react": "^3.8.0-dev-8d8b6a1",
"@thirdweb-dev/sdk": "^3.8.0-dev-8d8b6a1",
"@thirdweb-dev/storage": "^1.0.7-nightly-f295ec6",
"@thirdweb-dev/react": "^3.9.2",
"@thirdweb-dev/sdk": "^3.9.2",
"@thirdweb-dev/storage": "^1.0.10",
"color": "^4.2.3",
"ethers": "^5.7.0",
"flat": "^5.0.2",
Expand Down
10 changes: 4 additions & 6 deletions src/embeds/erc1155.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,18 @@ const Erc1155Embed: React.FC<Erc1155EmbedProps> = ({
const urlParams = new URL(window.location.toString()).searchParams;

const App: React.FC = () => {
const chainId = Number(urlParams.get("chainId"));
const chain = JSON.parse(urlParams.get("chain") || "");
const contractAddress = urlParams.get("contract") || "";
const rpcUrl = urlParams.get("rpcUrl") || "";
const tokenId = urlParams.get("tokenId") || "0";
const relayerUrl = urlParams.get("relayUrl") || "";
const biconomyApiKey = urlParams.get("biconomyApiKey") || "";
const biconomyApiId = urlParams.get("biconomyApiId") || "";

const ipfsGateway = parseIpfsGateway(urlParams.get("ipfsGateway") || "");

const colorScheme = urlParams.get("theme") === "dark" ? "dark" : "light";
const primaryColor = urlParams.get("primaryColor") || "purple";

const ipfsGateway = parseIpfsGateway(urlParams.get("ipfsGateway") || "");

const sdkOptions = useGasless(relayerUrl, biconomyApiKey, biconomyApiId);

return (
Expand All @@ -101,7 +100,7 @@ const App: React.FC = () => {
/>
<ChakraProvider theme={chakraTheme}>
<ThirdwebProvider
desiredChainId={chainId}
activeChain={chain}
sdkOptions={sdkOptions}
storageInterface={
ipfsGateway
Expand All @@ -112,7 +111,6 @@ const App: React.FC = () => {
})
: undefined
}
chainRpc={rpcUrl ? { [chainId]: rpcUrl } : undefined}
>
<Erc1155Embed
contractAddress={contractAddress}
Expand Down
9 changes: 4 additions & 5 deletions src/embeds/erc20.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ const Erc20Embed: React.FC<Erc20EmbedProps> = ({
const urlParams = new URL(window.location.toString()).searchParams;

const App: React.FC = () => {
const chainId = Number(urlParams.get("chainId"));
const chain = JSON.parse(urlParams.get("chain") || "");
const contractAddress = urlParams.get("contract") || "";
const rpcUrl = urlParams.get("rpcUrl") || "";
const relayerUrl = urlParams.get("relayUrl") || "";
const biconomyApiKey = urlParams.get("biconomyApiKey") || "";
const biconomyApiId = urlParams.get("biconomyApiId") || "";

const ipfsGateway = parseIpfsGateway(urlParams.get("ipfsGateway") || "");
const colorScheme = urlParams.get("theme") === "dark" ? "dark" : "light";
const primaryColor = urlParams.get("primaryColor") || "purple";

const ipfsGateway = parseIpfsGateway(urlParams.get("ipfsGateway") || "");

const sdkOptions = useGasless(relayerUrl, biconomyApiKey, biconomyApiId);

return (
Expand All @@ -94,7 +94,7 @@ const App: React.FC = () => {
/>
<ChakraProvider theme={chakraTheme}>
<ThirdwebProvider
desiredChainId={chainId}
activeChain={chain}
sdkOptions={sdkOptions}
storageInterface={
ipfsGateway
Expand All @@ -105,7 +105,6 @@ const App: React.FC = () => {
})
: undefined
}
chainRpc={rpcUrl ? { [chainId]: rpcUrl } : undefined}
>
<Erc20Embed
contractAddress={contractAddress}
Expand Down
6 changes: 2 additions & 4 deletions src/embeds/erc721.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ const Erc721Embed: React.FC<Erc721EmbedProps> = ({
const urlParams = new URL(window.location.toString()).searchParams;

const App: React.FC = () => {
const chainId = Number(urlParams.get("chainId"));
const chain = JSON.parse(urlParams.get("chain") || "");
const contractAddress = urlParams.get("contract") || "";
const rpcUrl = urlParams.get("rpcUrl") || "";
const relayerUrl = urlParams.get("relayUrl") || "";
const biconomyApiKey = urlParams.get("biconomyApiKey") || "";
const biconomyApiId = urlParams.get("biconomyApiId") || "";
Expand All @@ -96,7 +95,7 @@ const App: React.FC = () => {
/>
<ChakraProvider theme={chakraTheme}>
<ThirdwebProvider
desiredChainId={chainId}
activeChain={chain}
sdkOptions={sdkOptions}
storageInterface={
ipfsGateway
Expand All @@ -107,7 +106,6 @@ const App: React.FC = () => {
})
: undefined
}
chainRpc={rpcUrl ? { [chainId]: rpcUrl } : undefined}
>
<Erc721Embed
contractAddress={contractAddress}
Expand Down
6 changes: 2 additions & 4 deletions src/embeds/marketplace-v3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,8 @@ const MarketplaceV3Embed: React.FC<MarketplaceV3EmbedProps> = ({
const urlParams = new URL(window.location.toString()).searchParams;

const App: React.FC = () => {
const chainId = Number(urlParams.get("chainId"));
const chain = JSON.parse(urlParams.get("chain") || "");
const contractAddress = urlParams.get("contract") || "";
const rpcUrl = urlParams.get("rpcUrl") || "";
const directListingId = urlParams.get("directListingId") || "";
const englishAuctionId = urlParams.get("englishAuctionId") || "";
const relayerUrl = urlParams.get("relayUrl") || "";
Expand Down Expand Up @@ -703,7 +702,7 @@ const App: React.FC = () => {
/>
<ChakraProvider theme={chakraTheme}>
<ThirdwebProvider
desiredChainId={chainId}
activeChain={chain}
sdkOptions={sdkOptions}
storageInterface={
ipfsGateway
Expand All @@ -714,7 +713,6 @@ const App: React.FC = () => {
})
: undefined
}
chainRpc={rpcUrl ? { [chainId]: rpcUrl } : undefined}
>
<MarketplaceV3Embed
contractAddress={contractAddress}
Expand Down
6 changes: 2 additions & 4 deletions src/embeds/marketplace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,8 @@ const MarketplaceEmbed: React.FC<MarketplaceEmbedProps> = ({
const urlParams = new URL(window.location.toString()).searchParams;

const App: React.FC = () => {
const chainId = Number(urlParams.get("chainId"));
const chain = JSON.parse(urlParams.get("chain") || "");
const contractAddress = urlParams.get("contract") || "";
const rpcUrl = urlParams.get("rpcUrl") || "";
const listingId = urlParams.get("listingId") || "";
const relayerUrl = urlParams.get("relayUrl") || "";
const biconomyApiKey = urlParams.get("biconomyApiKey") || "";
Expand All @@ -675,7 +674,7 @@ const App: React.FC = () => {
/>
<ChakraProvider theme={chakraTheme}>
<ThirdwebProvider
desiredChainId={chainId}
activeChain={chain}
sdkOptions={sdkOptions}
storageInterface={
ipfsGateway
Expand All @@ -686,7 +685,6 @@ const App: React.FC = () => {
})
: undefined
}
chainRpc={rpcUrl ? { [chainId]: rpcUrl } : undefined}
>
<MarketplaceEmbed
contractAddress={contractAddress}
Expand Down
96 changes: 49 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2610,40 +2610,46 @@
"@types/use-sync-external-store" "^0.0.3"
use-sync-external-store "^1.2.0"

"@thirdweb-dev/auth@*":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-3.0.3.tgz#60fd9e20629cdadd0ec6365d95de61a0f715c18c"
integrity sha512-zTZjOzo6O0kpahzY5ves2q3p53MhenxG0bKgig9iMdQ3XmtKR08unLHgtMPHjgJ1DIsIvyJOKqDn2Nhom+QvKw==
"@thirdweb-dev/auth@^3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/auth/-/auth-3.0.6.tgz#c589d68642003c83ee62f33d084c1fb8bc6ffc3d"
integrity sha512-NMyNK3895smtSxef2GTlpjR0LEZrhKyu3fsgEUhqDsai4rqdbTB8h2GAMNlRLOmnJkmJaRsOjie4JDsNGvQVnw==
dependencies:
cookie "^0.5.0"
uuid "^9.0.0"
zod "^3.20.2"

"@thirdweb-dev/contracts-js@1.3.0-dev-8d8b6a1":
version "1.3.0-dev-8d8b6a1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts-js/-/contracts-js-1.3.0-dev-8d8b6a1.tgz#b754b0a4002ba727605faec67f5b6adf7a32fde0"
integrity sha512-m0C8Ef2S/B480epHJo7nARgZIj3smAIi245B2FOIbVpenyXwes2ZUtLs/uy3XjG6rEiWnv+NDG1BLm2hfGqGGA==
"@thirdweb-dev/chains@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/chains/-/chains-0.1.2.tgz#af256c5a302e3475828f886022fa88e5952b2cf4"
integrity sha512-eQvfXld/AzIsbvTy5jU001pR1d1SpmlQnHLkWV9mlLPGOLdajPZ9Zoatfs0eI2oMvtoKWTJkschLh170xraP/w==

"@thirdweb-dev/contracts-js@^1.3.1":
version "1.3.1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts-js/-/contracts-js-1.3.1.tgz#e1e6a0d0c33fc2a7b87caaf556211238d028e326"
integrity sha512-iUEEBUN6wfhhiuVtFLNmMYXFGbJGXGOH45lGdbnn6Bsd3/4o/oBupbyciWixcUCzm9pbXhQWqwuMl/UtRhcmwQ==
dependencies:
"@thirdweb-dev/contracts" "3.3.3-0"
"@thirdweb-dev/contracts" "3.4.1"

"@thirdweb-dev/contracts@3.3.3-0":
version "3.3.3-0"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts/-/contracts-3.3.3-0.tgz#c74f65e22378ca420ff6fe1527e0e8ff4f067bb2"
integrity sha512-vKA0a728JPH51la8wfaTpOzhCCOV9H9a4Snab3dAfCq4tFuG4PD/CK5ffPuEt3TYFf0/snQp8lrSdHNBAnLHoQ==
"@thirdweb-dev/contracts@3.4.1":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/contracts/-/contracts-3.4.1.tgz#e5a63e705b2f2014fe3fabf3e30209e3c5034348"
integrity sha512-BURfuFYZhJOmoycDwo8iaKUi+rdjt9vRGFd0vquqNjL2vQdI7dXqdbuJuOepIwGld5gvRNM+WlnVQ8EZgQIjqg==

"@thirdweb-dev/react-core@3.8.0-dev-8d8b6a1":
version "3.8.0-dev-8d8b6a1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-3.8.0-dev-8d8b6a1.tgz#bcd86d3f4c69f6573b36338b4c58c4fdbd507c98"
integrity sha512-BlZ0kd3BGSZpnye8jEesY0h9nFFrfi4iopCUU2wCQ4En+0fsffGcxNV8VNyPxBNhTRIk+vISqzYRYpMGKAvl0Q==
"@thirdweb-dev/react-core@^3.9.2":
version "3.9.2"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react-core/-/react-core-3.9.2.tgz#696a3ba4d505f67890650d39126cf3dc2032fd26"
integrity sha512-A3Z9Wj8ZIFvJWCQ8jCmHDWq1agb5P1clFCSkoTk8JsShYsLuIhd3L9fd5aLIgqITQQCSN7UuNd0qii4/PKNceA==
dependencies:
"@tanstack/react-query" "^4.0.10"
"@thirdweb-dev/auth" "*"
"@thirdweb-dev/auth" "^3.0.6"
"@thirdweb-dev/chains" "^0.1.2"
tiny-invariant "^1.2.0"

"@thirdweb-dev/react@^3.8.0-dev-8d8b6a1":
version "3.8.0-dev-8d8b6a1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-3.8.0-dev-8d8b6a1.tgz#8819f9119b6ee4b3fa4b71057a415d917e989aab"
integrity sha512-wi9UZlxSUujbU5brnOtwqBmx1n+8C1y1xMm8yBzTrFefnWDicAuRzDP/QjY324K0MbIJcVoVjCV9ZHAG5KiqQA==
"@thirdweb-dev/react@^3.9.2":
version "3.9.2"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/react/-/react-3.9.2.tgz#0d22c60a3b7ec8974eb20b1a8de18cca89857e28"
integrity sha512-MMs5LXCJ24ukBHZG9M5WqkqFejUe9zZP67NPir+Y0BzNSvlc6JYcYUiwrsMZ+rFKVrJb7Lpqbnf3qh9c/NJr6A==
dependencies:
"@emotion/react" "^11.10.0"
"@emotion/styled" "^11.10.0"
Expand All @@ -2653,7 +2659,9 @@
"@safe-global/safe-ethers-adapters" "0.1.0-alpha.13"
"@safe-global/safe-ethers-lib" "^1.7.0"
"@tanstack/react-query" "^4.0.10"
"@thirdweb-dev/react-core" "3.8.0-dev-8d8b6a1"
"@thirdweb-dev/chains" "^0.1.2"
"@thirdweb-dev/react-core" "^3.9.2"
"@thirdweb-dev/wallets" "^0.2.3"
"@zag-js/menu" "0.3.4"
"@zag-js/react" "0.3.4"
buffer "^6.0.3"
Expand All @@ -2662,17 +2670,17 @@
detect-browser "^5.3.0"
magic-sdk "^10.1.0"
mime "^3.0.0"
react-cool-dimensions "^2.0.7"
tiny-invariant "^1.2.0"
wagmi "^0.2.28"

"@thirdweb-dev/sdk@^3.8.0-dev-8d8b6a1":
version "3.8.0-dev-8d8b6a1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-3.8.0-dev-8d8b6a1.tgz#658a0af8b96f2d3b0063986cfad099c9de97ef6d"
integrity sha512-MNXyn33pM0blWUjmtxtx21XeCgqm+OBSw4vdDLpx9dL3HNBDUY32WSjBqG9S1te0hveyiQnby1/8i28JzAJkMg==
"@thirdweb-dev/sdk@^3.9.2":
version "3.9.2"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/sdk/-/sdk-3.9.2.tgz#b0dc38cc742f00f657cd02edda2e936db35c45a1"
integrity sha512-pqLrf4fJ5Ohr7svovRGpIsiWxHzsay3RiVOXVgpsHqeFiSLINtMjwZMwi0VqqF+xhp607LBobvc3cJJonM6UrA==
dependencies:
"@thirdweb-dev/contracts-js" "1.3.0-dev-8d8b6a1"
"@thirdweb-dev/storage" "1.0.7-dev-8d8b6a1"
"@thirdweb-dev/chains" "^0.1.2"
"@thirdweb-dev/contracts-js" "^1.3.1"
"@thirdweb-dev/storage" "^1.0.10"
bn.js "^5.2.1"
bs58 "^5.0.0"
cross-fetch "^3.1.5"
Expand All @@ -2685,23 +2693,22 @@
yaml "^2.1.1"
zod "^3.11.6"

"@thirdweb-dev/storage@1.0.7-dev-8d8b6a1":
version "1.0.7-dev-8d8b6a1"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/storage/-/storage-1.0.7-dev-8d8b6a1.tgz#8085441cd3350dc43fc2373013f277346a0eaff5"
integrity sha512-aUP3+gjfXk+SdxAM/ko3otD1jqLW/pZ0nGgQR3YzpW+A9oSHj2iVMfuPVNDDc/c8Fc5NgbUlOtnkdN8UjUrc+Q==
"@thirdweb-dev/storage@^1.0.10":
version "1.0.10"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/storage/-/storage-1.0.10.tgz#e6ed7618d577307d5d1585f06828fa6effceea88"
integrity sha512-emTFan8ujs4pTkLFchQyV8ktUXzo6f+8y3xuCLdggHyW0bOF+v7mSt0p5fScUf/5sf5+zukRCHyjOh6MSCuMkA==
dependencies:
cross-fetch "^3.1.5"
form-data "^4.0.0"
uuid "^9.0.0"

"@thirdweb-dev/storage@^1.0.7-nightly-f295ec6":
version "1.0.7-nightly-f295ec6"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/storage/-/storage-1.0.7-nightly-f295ec6.tgz#435e4941c5d41774cc222f9191cb56433f364bbe"
integrity sha512-iKKrqhRbEggbTPU2be3/N07TtsQOebb19jkDV/GYv+P1z26RlKEdvObl0YJ9rUurpXvnY4emxjZy3P6YFE2uYA==
"@thirdweb-dev/wallets@^0.2.3":
version "0.2.3"
resolved "https://registry.yarnpkg.com/@thirdweb-dev/wallets/-/wallets-0.2.3.tgz#3d39910c319ad57fe54574cb4aba459cbd4e0366"
integrity sha512-8jkMvmqYqKymABOLyh4V9MXboot5YLLXVmfYC1gQX33fkJPMyupqI1KrVFEAfvuSBLMlH/mVRywzaNlP0soSHw==
dependencies:
cross-fetch "^3.1.5"
form-data "^4.0.0"
uuid "^9.0.0"
eventemitter3 "^5.0.0"
localforage "^1.10.0"

"@trysound/sax@0.2.0":
version "0.2.0"
Expand Down Expand Up @@ -6086,7 +6093,7 @@ lmdb@2.5.2:
"@lmdb/lmdb-linux-x64" "2.5.2"
"@lmdb/lmdb-win32-x64" "2.5.2"

localforage@^1.7.4:
localforage@^1.10.0, localforage@^1.7.4:
version "1.10.0"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
Expand Down Expand Up @@ -6870,11 +6877,6 @@ react-clientside-effect@^1.2.6:
dependencies:
"@babel/runtime" "^7.12.13"

react-cool-dimensions@^2.0.7:
version "2.0.7"
resolved "https://registry.yarnpkg.com/react-cool-dimensions/-/react-cool-dimensions-2.0.7.tgz#2fe6657608f034cd7c89f149ed14e79cf1cb2d50"
integrity sha512-z1VwkAAJ5d8QybDRuYIXTE41RxGr5GYsv1bQhbOBE8cMfoZQZpcF0odL64vdgrQVzat2jayedj1GoYi80FWcbA==

react-dom@^18.1.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
Expand Down