Skip to content

Commit

Permalink
Merge pull request #12 from 0xsequence/1989-indexer
Browse files Browse the repository at this point in the history
more metadata opptions
  • Loading branch information
SamueleA authored Mar 26, 2024
2 parents 3a98e9d + 8482e93 commit 78093ac
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 156 deletions.
2 changes: 1 addition & 1 deletion packages/checkout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-checkout",
"version": "2.0.6",
"version": "2.0.7",
"description": "Checkout UI for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/checkout",
"main": "dist/0xsequence-kit-checkout.cjs.js",
Expand Down
11 changes: 10 additions & 1 deletion packages/checkout/src/api/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ export const getTokenBalances = async ({ accountAddress, chainId }: GetTokenBala
try {
const { indexerClient } = await getNetworkConfigAndClients(chainId)

const res = await indexerClient.getTokenBalances({ accountAddress, includeMetadata: true})
const res = await indexerClient.getTokenBalances({
accountAddress,
includeMetadata: true,
metadataOptions: {
verifiedOnly: true
}
})

return res?.balances || []
} catch(e) {
Expand Down Expand Up @@ -82,6 +88,9 @@ export const fetchCollectionBalance = async ({ accountAddress, chainId, collecti
accountAddress,
includeMetadata: true,
contractAddress: collectionAddress,
metadataOptions: {
verifiedOnly: true
}
})

return res?.balances || []
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-connectors",
"version": "2.0.6",
"version": "2.0.7",
"description": "Wallets for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/connectors",
"main": "dist/0xsequence-kit-connectors.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit",
"version": "2.0.6",
"version": "2.0.7",
"description": "Core package for Sequence Kit",
"keywords": [
"sequence",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-wallet",
"version": "2.0.6",
"version": "2.0.7",
"description": "Wallet UI for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/wallet",
"main": "dist/0xsequence-kit-wallet.cjs.js",
Expand Down
8 changes: 7 additions & 1 deletion packages/wallet/src/api/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ export const fetchCollectionBalance = async ({
accountAddress,
includeMetadata,
contractAddress: collectionAddress,
metadataOptions: {
verifiedOnly: true
}
})

return res?.balances || []
Expand Down Expand Up @@ -378,7 +381,10 @@ export const getCollectibleBalance = async ({
accountAddress,
includeMetadata: true,
contractAddress: collectionAddress,
tokenID: tokenId
tokenID: tokenId,
metadataOptions: {
verifiedOnly: true
}
})
const tokenBalance = res.balances[0]

Expand Down
158 changes: 8 additions & 150 deletions pnpm-lock.yaml

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

0 comments on commit 78093ac

Please sign in to comment.