Skip to content

Commit

Permalink
👽 Change tokensByAttributes fetch (#396)
Browse files Browse the repository at this point in the history
Co-authored-by: mintbaseteam <eng@mintbase.io>
  • Loading branch information
sainthiago and mintbaseteam authored Sep 20, 2023
1 parent 092ae68 commit 08882b4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 34 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": true,
"version": "0.4.1-beta.3",
"version": "0.8.10-rc-change-filter-endpoint",
"packages": [
"packages/*"
]
Expand Down
52 changes: 26 additions & 26 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "mintbase-next-test-suite",
"version": "0.4.1-beta.3",
"version": "0.8.10-rc-change-filter-endpoint",
"private": true,
"scripts": {
"dev": "next dev",
"lint": "eslint . --fix --ext ts --ext tsx"
},
"dependencies": {
"@mintbase-js/react": "^0.4.1-beta.3",
"@mintbase-js/react": "^0.8.10-rc-change-filter-endpoint",
"@mintbase-js/sdk": "^0.1.0-beta.26",
"@near-wallet-selector/modal-ui": "^7.0.3",
"cookies": "^0.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export const tokensByAttributes = async (
? META_SERVICE_HOST_TESTNET
: META_SERVICE_HOST;

const filtersString = JSON.stringify(filters);
const filtersBase64 = Buffer.from(filtersString).toString('base64');

try {
const res = await fetch(`${useHost}/stores/${contractId}/filter`, {
method: 'POST',
body: JSON.stringify(filters),
const res = await fetch(`${useHost}/stores/${contractId}/filter?args=${filtersBase64}`, {
method: 'GET',
headers: { 'Content-type': 'application/json',
[MINTBASE_API_KEY_HEADER]: mbjs.keys.apiKey,
},
Expand Down
4 changes: 2 additions & 2 deletions packages/storage/package-lock.json

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

0 comments on commit 08882b4

Please sign in to comment.