Skip to content

Commit a4827f8

Browse files
committed
Marketplace end-to-end guide: Remove inventory section and update some installation commands
1 parent e2fdd10 commit a4827f8

File tree

1 file changed

+25
-41
lines changed

1 file changed

+25
-41
lines changed

guides/custom-marketplace.mdx

+25-41
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,13 @@ Either you can start from a great foundation with our [Marketplace Boilerplate](
3232
Start by creating a project in a folder of your name choosing:
3333

3434
```bash npm
35-
npm create vite
35+
npm create vite --template react-ts
3636
# or
37-
pnpm create vite
37+
pnpm create vite --template react-ts
3838
# or
39-
yarn create vite
39+
yarn create vite --template react-ts
4040
```
4141

42-
*Recommended options*
43-
* React
44-
* Typescript
45-
4642
Then, begin by installing the required packages in the `<project_name> folder`
4743

4844
```bash pnpm
@@ -183,29 +179,13 @@ import type { SdkConfig } from '@0xsequence/marketplace-sdk';
183179

184180
const projectAccessKey = import.meta.env.VITE_PROJECT_ACCESS_KEY;
185181
const projectId = import.meta.env.VITE_PROJECT_ID!;
186-
const waasConfigKey = import.meta.env.VITE_WAAS_CONFIG_KEY;
187-
const googleClientId = import.meta.env.VITE_GOOGLE_CLIENT_ID;
188-
const appleClientId = import.meta.env.VITE_APPLE_CLIENT_ID;
189-
const appleRedirectURI = window.location.origin + window.location.pathname;
190182
const walletConnectId = import.meta.env.VITE_WALLET_CONNECT_ID;
191183

192184
export function getConfig() {
193-
const embedded = waasConfigKey
194-
? ({
195-
waasConfigKey,
196-
googleClientId,
197-
appleClientId,
198-
appleRedirectURI,
199-
} satisfies NonNullable<SdkConfig["wallet"]>["embedded"])
200-
: undefined;
201-
202185
const config = {
203186
projectId,
204187
projectAccessKey,
205-
wallet: {
206-
walletConnectProjectId: walletConnectId,
207-
embedded,
208-
},
188+
walletConnectProjectId: walletConnectId
209189
} satisfies SdkConfig;
210190

211191
return config;
@@ -286,16 +266,23 @@ export const Collection = ({
286266
}
287267

288268
return (
289-
<div onClick={handleOnSelectCollection} className="flex flex-col gap-2 border rounded-lg cursor-pointer w-[400px]">
290-
<h2>
291-
{name} {symbol && <span>({symbol})</span>}
292-
</h2>
293-
<p>{collection.address}</p>
294-
<p>Chain ID: {collection.chainId}</p>
295-
<img src={image} alt={collection.address} className="w-[200px] h-[200px] object-cover object-center"/>
296-
<p>Contract type: {contractType}</p>
297-
<p>{description}</p>
298-
</div>
269+
<div
270+
onClick={handleOnSelectCollection}
271+
className="flex flex-col gap-2 border rounded-lg cursor-pointer w-[400px]"
272+
>
273+
<h2>
274+
{name} {symbol && <span>({symbol})</span>}
275+
</h2>
276+
<p>{collection.address}</p>
277+
<p>Chain ID: {collection.chainId}</p>
278+
<img
279+
src={image}
280+
alt={collection.address}
281+
className="w-[200px] h-[200px] object-cover object-center"
282+
/>
283+
<p>Contract type: {contractType}</p>
284+
<p>{description}</p>
285+
</div>
299286
);
300287
};
301288
```
@@ -479,6 +466,7 @@ export const Collectible = ({
479466
}) => {
480467
const { name, image, tokenId } = collectible.metadata;
481468

469+
// @ts-ignore: unused variable 'isBalanceLoading'
482470
const { data: userBalanceResp, isLoading: isBalanceLoading } =
483471
useBalanceOfCollectible({
484472
chainId: Number(chainId),
@@ -579,7 +567,9 @@ export const Collectibles = ({
579567
const { address, isConnected } = useAccount();
580568
const {
581569
data: collectibles,
570+
// @ts-ignore: unused variable 'collectiblesLoading'
582571
isLoading: collectiblesLoading,
572+
// @ts-ignore: unused variable 'fetchNextCollectibles'
583573
fetchNextPage: fetchNextCollectibles,
584574
} = useListCollectibles({
585575
chainId: Number(chainId),
@@ -709,10 +699,4 @@ export default App;
709699

710700
### Run and test
711701

712-
You’ve successfully added the items to your new page, and they should now be visible in the UI. To see them in action, run pnpm dev. From the landing page, select any of your collections to view the NFTs it contains. Make sure everything works as expected by testing key flows like listing, purchasing, making offers, and accepting offers on an NFT.
713-
714-
## 6. Inventory (Optional)
715-
716-
To access the user's inventory, you can refer to the following documentation: [Sequence Inventory Modal](https://docs.sequence.xyz/solutions/wallets/sequence-kit/quickstart_examples/inventory). Everything is set up, and you only need to invoke the inventory modal.
717-
718-
If you prefer to build a custom UI using APIs, you can retrieve token balances through the following endpoint: [Get Token Balances API](https://docs.sequence.xyz/api/indexer/endpoints#tag/public/POST/rpc/Indexer/GetTokenBalances).
702+
You’ve successfully added the items to your new page, and they should now be visible in the UI. To see them in action, run pnpm dev. From the landing page, select any of your collections to view the NFTs it contains. Make sure everything works as expected by testing key flows like listing, purchasing, making offers, and accepting offers on an NFT.

0 commit comments

Comments
 (0)