diff --git a/e2e/filters.spec.ts b/e2e/filters.spec.ts index cc5233587..187fe19c6 100644 --- a/e2e/filters.spec.ts +++ b/e2e/filters.spec.ts @@ -1,9 +1,9 @@ -import { test, expect } from '@playwright/test'; -import { GetTransactionListTypeEnum } from '@stacks/blockchain-api-client'; +import { expect, test } from '@playwright/test'; + import { txs } from './mocks'; test.describe('Transaction page', () => { - test.beforeEach(async ({ page, context }) => { + test.beforeEach(async ({ page }) => { await page.route('**/extended/v1/tx**', route => route.fulfill({ status: 200, @@ -22,31 +22,23 @@ test.describe('Transaction page', () => { await page.waitForTimeout(1000); // smart_contract filter - await page.click(`[data-test=${GetTransactionListTypeEnum.smart_contract}]`); - await expect( - page.locator(`[data-test=${GetTransactionListTypeEnum.smart_contract}-transaction]`) - ).toBeHidden(); + await page.click(`[data-test=smart_contract]`); + await expect(page.locator(`[data-test=smart_contract-transaction]`)).toBeHidden(); await page.waitForTimeout(1000); // contract_call filter - await page.click(`[data-test=${GetTransactionListTypeEnum.contract_call}]`); - await expect( - page.locator(`[data-test=${GetTransactionListTypeEnum.contract_call}-transaction]`) - ).toBeHidden(); + await page.click(`[data-test=contract_call]`); + await expect(page.locator(`[data-test=contract_call-transaction]`)).toBeHidden(); await page.waitForTimeout(1000); // token_transfer filter - await page.click(`[data-test=${GetTransactionListTypeEnum.token_transfer}]`); - await expect( - page.locator(`[data-test=${GetTransactionListTypeEnum.token_transfer}-transaction]`) - ).toBeHidden(); + await page.click(`[data-test=token_transfer]`); + await expect(page.locator(`[data-test=token_transfer-transaction]`)).toBeHidden(); await page.waitForTimeout(1000); // coinbase filter - await page.click(`[data-test=${GetTransactionListTypeEnum.coinbase}]`); - await expect( - page.locator(`[data-test=${GetTransactionListTypeEnum.coinbase}-transaction]`) - ).toBeHidden(); + await page.click(`[data-test=coinbase]`); + await expect(page.locator(`[data-test=coinbase-transaction]`)).toBeHidden(); await page.waitForTimeout(1000); }); }); diff --git a/e2e/mocks.ts b/e2e/mocks.ts index c6a4b8247..c846d7a9b 100644 --- a/e2e/mocks.ts +++ b/e2e/mocks.ts @@ -1,10 +1,8 @@ -import { GetTransactionListTypeEnum } from '@stacks/blockchain-api-client'; - export const txs = [ { tx_id: '0x1', sender_address: 'SP1', - tx_type: GetTransactionListTypeEnum.contract_call, + tx_type: 'contract_call', contract_call: { contract_id: 'SP1.contract1', function_name: 'transaction-1', @@ -13,7 +11,7 @@ export const txs = [ { tx_id: '0x2', sender_address: 'SP1', - tx_type: GetTransactionListTypeEnum.token_transfer, + tx_type: 'token_transfer', token_transfer: { amount: 1, }, @@ -21,11 +19,11 @@ export const txs = [ { tx_id: '0x3', sender_address: 'SP1', - tx_type: GetTransactionListTypeEnum.coinbase, + tx_type: 'coinbase', }, { tx_id: '0x4', sender_address: 'SP1', - tx_type: GetTransactionListTypeEnum.smart_contract, + tx_type: 'smart_contract', }, ]; diff --git a/package.json b/package.json index 1990ea648..41ecc6e97 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@reduxjs/toolkit": "1.9.7", "@sentry/nextjs": "8.26.0", "@stacks/auth": "6.15.0", - "@stacks/blockchain-api-client": "7.12.0", + "@stacks/blockchain-api-client": "8.2.2", "@stacks/common": "6.15.1-pr.0bcf867e.0+0bcf867e", "@stacks/connect": "7.7.1", "@stacks/connect-react": "22.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e371c922e..efa63ca93 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,7 +23,7 @@ dependencies: version: 2.8.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.0)(framer-motion@10.16.4)(react-dom@18.2.0)(react@18.2.0) '@chakra-ui/theme-tools': specifier: 2.1.2 - version: 2.1.2(@chakra-ui/styled-system@2.12.0) + version: 2.1.2(@chakra-ui/styled-system@2.9.2) '@contentful/rich-text-react-renderer': specifier: 15.21.2 version: 15.21.2(react-dom@18.2.0)(react@18.2.0) @@ -80,13 +80,13 @@ dependencies: version: 1.9.7(react-redux@8.1.2)(react@18.2.0) '@sentry/nextjs': specifier: 8.26.0 - version: 8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.27.0)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.27.0)(next@14.2.13)(react@18.2.0)(webpack@5.95.0) + version: 8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.25.1)(next@14.2.13)(react@18.2.0)(webpack@5.94.0) '@stacks/auth': specifier: 6.15.0 version: 6.15.0 '@stacks/blockchain-api-client': - specifier: 7.12.0 - version: 7.12.0 + specifier: 8.2.2 + version: 8.2.2 '@stacks/common': specifier: 6.15.1-pr.0bcf867e.0+0bcf867e version: 6.15.1-pr.0bcf867e.0 @@ -176,7 +176,7 @@ dependencies: version: 3.0.1(onigasm@2.2.5) monaco-vscode-textmate-theme-converter: specifier: 0.1.7 - version: 0.1.7(tslib@2.8.0) + version: 0.1.7(tslib@2.6.2) monacode: specifier: 0.3.1 version: 0.3.1 @@ -185,7 +185,7 @@ dependencies: version: 1.10.0 next: specifier: 14.2.13 - version: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + version: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) nookies: specifier: 2.5.2 version: 2.5.2 @@ -197,7 +197,7 @@ dependencies: version: 8.0.0 preact-render-to-string: specifier: 5.1.19 - version: 5.1.19(preact@10.24.3) + version: 5.1.19(preact@10.19.3) prismjs: specifier: 1.29.0 version: 1.29.0 @@ -212,7 +212,7 @@ dependencies: version: 6.1.0(react@18.2.0) react-countup: specifier: 6.4.2 - version: 6.4.2(@babel/core@7.26.0)(react@18.2.0) + version: 6.4.2(@babel/core@7.25.7)(react@18.2.0) react-csv: specifier: 2.2.2 version: 2.2.2 @@ -242,7 +242,7 @@ dependencies: version: 0.13.1(react-dom@18.2.0)(react@18.2.0) react-ssr-prepass: specifier: npm:preact-ssr-prepass - version: /preact-ssr-prepass@1.2.1(preact@10.24.3) + version: /preact-ssr-prepass@1.2.1(preact@10.19.3) recharts: specifier: 2.12.7 version: 2.12.7(react-dom@18.2.0)(react@18.2.0) @@ -289,7 +289,7 @@ devDependencies: version: 1.40.0 '@stacks/eslint-config': specifier: 2.0.0 - version: 2.0.0(eslint-plugin-import@2.29.0)(eslint-plugin-prettier@5.0.1)(eslint-plugin-unused-imports@4.1.4)(eslint@8.54.0)(typescript@5.3.2) + version: 2.0.0(eslint-plugin-import@2.29.0)(eslint-plugin-prettier@5.0.1)(eslint-plugin-unused-imports@3.0.0)(eslint@8.54.0)(typescript@5.3.2) '@stacks/prettier-config': specifier: 0.0.10 version: 0.0.10 @@ -316,7 +316,7 @@ devDependencies: version: 8.3.5(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5) '@storybook/nextjs': specifier: 8.3.5 - version: 8.3.5(esbuild@0.23.1)(next@14.2.13)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2)(webpack@5.95.0) + version: 8.3.5(esbuild@0.23.1)(next@14.2.13)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2)(webpack@5.94.0) '@storybook/react': specifier: 8.3.5 version: 8.3.5(@storybook/test@8.3.5)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2) @@ -450,13 +450,6 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 - /@ampproject/remapping@2.3.0: - resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - /@babel/code-frame@7.23.4: resolution: {integrity: sha512-r1IONyb6Ia+jYR2vvIDhdWdlTGhqbBoFqLTQidzZ4kepUFH15ejXvFHxCVbtl7BOXIudsIubf4E81xeA3h3IXA==} engines: {node: '>=6.9.0'} @@ -477,15 +470,6 @@ packages: dependencies: '@babel/highlight': 7.25.7 picocolors: 1.0.0 - dev: true - - /@babel/code-frame@7.26.0: - resolution: {integrity: sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.25.9 - js-tokens: 4.0.0 - picocolors: 1.1.1 /@babel/compat-data@7.23.3: resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} @@ -499,11 +483,6 @@ packages: /@babel/compat-data@7.25.7: resolution: {integrity: sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==} engines: {node: '>=6.9.0'} - dev: true - - /@babel/compat-data@7.26.0: - resolution: {integrity: sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==} - engines: {node: '>=6.9.0'} /@babel/core@7.23.3: resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} @@ -520,7 +499,7 @@ packages: '@babel/traverse': 7.23.4 '@babel/types': 7.23.4 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.6 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -543,7 +522,7 @@ packages: '@babel/traverse': 7.23.6 '@babel/types': 7.23.6 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.3.6 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -571,29 +550,6 @@ packages: semver: 6.3.1 transitivePeerDependencies: - supports-color - dev: true - - /@babel/core@7.26.0: - resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.0 - '@babel/generator': 7.26.0 - '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) - '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.1 - '@babel/template': 7.25.9 - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 - convert-source-map: 2.0.0 - debug: 4.3.7 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color /@babel/generator@7.17.7: resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} @@ -631,17 +587,6 @@ packages: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 - dev: true - - /@babel/generator@7.26.0: - resolution: {integrity: sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/parser': 7.26.1 - '@babel/types': 7.26.0 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 3.0.2 /@babel/helper-annotate-as-pure@7.25.7: resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} @@ -690,17 +635,6 @@ packages: browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 - dev: true - - /@babel/helper-compilation-targets@7.25.9: - resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.26.0 - '@babel/helper-validator-option': 7.25.9 - browserslist: 4.24.2 - lru-cache: 5.1.1 - semver: 6.3.1 /@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.7): resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} @@ -740,7 +674,7 @@ packages: '@babel/core': 7.25.7 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.25.7 - debug: 4.3.7 + debug: 4.3.6 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -788,16 +722,6 @@ packages: '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - dev: true - - /@babel/helper-module-imports@7.25.9: - resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/traverse': 7.25.9 - '@babel/types': 7.26.0 - transitivePeerDependencies: - - supports-color /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} @@ -839,20 +763,6 @@ packages: '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - dev: true - - /@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0): - resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.26.0 - '@babel/helper-module-imports': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - '@babel/traverse': 7.25.9 - transitivePeerDependencies: - - supports-color /@babel/helper-optimise-call-expression@7.25.7: resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} @@ -913,7 +823,6 @@ packages: '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - dev: true /@babel/helper-skip-transparent-expression-wrappers@7.25.7: resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} @@ -938,11 +847,6 @@ packages: /@babel/helper-string-parser@7.25.7: resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-string-parser@7.25.9: - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} /@babel/helper-validator-identifier@7.22.20: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} @@ -951,11 +855,6 @@ packages: /@babel/helper-validator-identifier@7.25.7: resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-identifier@7.25.9: - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} @@ -969,11 +868,6 @@ packages: /@babel/helper-validator-option@7.25.7: resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.25.9: - resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} - engines: {node: '>=6.9.0'} /@babel/helper-wrap-function@7.25.7: resolution: {integrity: sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==} @@ -1013,14 +907,6 @@ packages: dependencies: '@babel/template': 7.25.7 '@babel/types': 7.25.7 - dev: true - - /@babel/helpers@7.26.0: - resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.25.9 - '@babel/types': 7.26.0 /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} @@ -1038,7 +924,6 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.0 - dev: true /@babel/parser@7.23.4: resolution: {integrity: sha512-vf3Xna6UEprW+7t6EtOmFpHNAuxw3xqPZghy+brsnusscJRW5BMUzzHZc5ICjULee81WeUV2jjakG09MDglJXQ==} @@ -1060,14 +945,6 @@ packages: hasBin: true dependencies: '@babel/types': 7.25.7 - dev: true - - /@babel/parser@7.26.1: - resolution: {integrity: sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.26.0 /@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.7): resolution: {integrity: sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==} @@ -2277,15 +2154,6 @@ packages: '@babel/code-frame': 7.25.7 '@babel/parser': 7.25.7 '@babel/types': 7.25.7 - dev: true - - /@babel/template@7.25.9: - resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.26.0 - '@babel/parser': 7.26.1 - '@babel/types': 7.26.0 /@babel/traverse@7.23.2: resolution: {integrity: sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==} @@ -2317,7 +2185,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.4 '@babel/types': 7.23.4 - debug: 4.3.7 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -2335,7 +2203,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 - debug: 4.3.7 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -2349,22 +2217,7 @@ packages: '@babel/parser': 7.25.7 '@babel/template': 7.25.7 '@babel/types': 7.25.7 - debug: 4.3.7 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/traverse@7.25.9: - resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.26.0 - '@babel/generator': 7.26.0 - '@babel/parser': 7.26.1 - '@babel/template': 7.25.9 - '@babel/types': 7.26.0 - debug: 4.3.7 + debug: 4.3.6 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -2399,14 +2252,6 @@ packages: '@babel/helper-string-parser': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 - dev: true - - /@babel/types@7.26.0: - resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 /@base2/pretty-print-object@1.0.1: resolution: {integrity: sha512-4iri8i1AqYHJE2DstZYkyEprg6Pq6sKx3xn5FpySk9sNhH7qN2LLlHJCfDTZRILNwQNPD7mATWM0TBui7uC1pA==} @@ -2812,7 +2657,7 @@ packages: '@chakra-ui/react': 2.8.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.0)(framer-motion@10.16.4)(react-dom@18.2.0)(react@18.2.0) '@emotion/cache': 11.11.0 '@emotion/react': 11.11.1(@types/react@18.2.0)(react@18.2.0) - next: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + next: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 dev: false @@ -3316,15 +3161,6 @@ packages: react: 18.2.0 dev: false - /@chakra-ui/styled-system@2.12.0(react@18.2.0): - resolution: {integrity: sha512-zoqLw1I2y4GlZ0LDoyw8o0JjoDOW6u0IwFPAoHuw0UMbP8glHUGvwEL1STug/i/GzBKw83yoF6ae41HIQvhMww==} - dependencies: - '@chakra-ui/utils': 2.2.2(react@18.2.0) - csstype: 3.1.3 - transitivePeerDependencies: - - react - dev: false - /@chakra-ui/styled-system@2.9.2: resolution: {integrity: sha512-To/Z92oHpIE+4nk11uVMWqo2GGRS86coeMmjxtpnErmWRdLcp1WVCVRAvn+ZwpLiNR+reWFr2FFqJRsREuZdAg==} dependencies: @@ -3421,17 +3257,6 @@ packages: react: 18.2.0 dev: false - /@chakra-ui/theme-tools@2.1.2(@chakra-ui/styled-system@2.12.0): - resolution: {integrity: sha512-Qdj8ajF9kxY4gLrq7gA+Azp8CtFHGO9tWMN2wfF9aQNgG9AuMhPrUzMq9AMQ0MXiYcgNq/FD3eegB43nHVmXVA==} - peerDependencies: - '@chakra-ui/styled-system': '>=2.0.0' - dependencies: - '@chakra-ui/anatomy': 2.2.2 - '@chakra-ui/shared-utils': 2.0.5 - '@chakra-ui/styled-system': 2.12.0(react@18.2.0) - color2k: 2.0.2 - dev: false - /@chakra-ui/theme-tools@2.1.2(@chakra-ui/styled-system@2.9.2): resolution: {integrity: sha512-Qdj8ajF9kxY4gLrq7gA+Azp8CtFHGO9tWMN2wfF9aQNgG9AuMhPrUzMq9AMQ0MXiYcgNq/FD3eegB43nHVmXVA==} peerDependencies: @@ -3528,16 +3353,6 @@ packages: lodash.mergewith: 4.6.2 dev: false - /@chakra-ui/utils@2.2.2(react@18.2.0): - resolution: {integrity: sha512-jUPLT0JzRMWxpdzH6c+t0YMJYrvc5CLericgITV3zDSXblkfx3DsYXqU11DJTSGZI9dUKzM1Wd0Wswn4eJwvFQ==} - peerDependencies: - react: '>=16.8.0' - dependencies: - '@types/lodash.mergewith': 4.6.9 - lodash.mergewith: 4.6.2 - react: 18.2.0 - dev: false - /@chakra-ui/visually-hidden@2.2.0(@chakra-ui/system@2.6.2)(react@18.2.0): resolution: {integrity: sha512-KmKDg01SrQ7VbTD3+cPWf/UfpF5MSwm3v7MWi0n5t8HnnadT13MF0MJCDSXbBWnzLv1ZKJ6zlyAOeARWX+DpjQ==} peerDependencies: @@ -3734,11 +3549,11 @@ packages: engines: {node: '>=10.0.0'} dev: false - /@emnapi/runtime@1.3.1: - resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} + /@emnapi/runtime@1.3.0: + resolution: {integrity: sha512-XMBySMuNZs3DM96xcJmLW4EfGnf+uGmFNjzpehMjuX5PLB5j87ar2Zc4e3PVeZ3I5g3tYtAqskB28manlF69Zw==} requiresBuild: true dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: true optional: true @@ -4171,13 +3986,13 @@ packages: resolution: {integrity: sha512-PEVLoa3zBevWSCZzPIM/lvPCi8P5l4G+NXQMc/CjEiaCWgyHieUoo0nM7Bs0n/NbuQ6JpXEolivQ9pKSBHaDlA==} dependencies: '@formatjs/intl-localematcher': 0.5.2 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@formatjs/fast-memoize@2.2.0: resolution: {integrity: sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@formatjs/icu-messageformat-parser@2.7.3: @@ -4185,20 +4000,20 @@ packages: dependencies: '@formatjs/ecma402-abstract': 1.18.0 '@formatjs/icu-skeleton-parser': 1.7.0 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@formatjs/icu-skeleton-parser@1.7.0: resolution: {integrity: sha512-Cfdo/fgbZzpN/jlN/ptQVe0lRHora+8ezrEeg2RfrNjyp+YStwBy7cqDY8k5/z2LzXg6O0AdzAV91XS0zIWv+A==} dependencies: '@formatjs/ecma402-abstract': 1.18.0 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@formatjs/intl-localematcher@0.5.2: resolution: {integrity: sha512-txaaE2fiBMagLrR4jYhxzFO6wEdEG4TPMqrzBAcbr4HFUYzH/YC+lg6OIzKCHm8WgDdyQevxbAAV1OgcXctuGw==} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@hirosystems/token-metadata-api-client@1.2.0: @@ -4384,7 +4199,7 @@ packages: cpu: [wasm32] requiresBuild: true dependencies: - '@emnapi/runtime': 1.3.1 + '@emnapi/runtime': 1.3.0 dev: true optional: true @@ -4899,7 +4714,7 @@ packages: next: ^13.0.0 || ^14.0.0 react: ^18.2.0 dependencies: - next: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + next: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 third-party-capital: 1.0.20 dev: false @@ -4965,16 +4780,6 @@ packages: '@opentelemetry/semantic-conventions': 1.25.1 dev: false - /@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0): - resolution: {integrity: sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.27.0 - dev: false - /@opentelemetry/instrumentation-connect@0.38.0(@opentelemetry/api@1.9.0): resolution: {integrity: sha512-2/nRnx3pjYEmdPIaBwtgtSviTKHWnDZN3R+TkRUnhIVrvBKVcq+I5B2rtd6mr6Fe9cHlZ9Ojcuh7pkNh/xdWWg==} engines: {node: '>=14'} @@ -5250,17 +5055,6 @@ packages: '@opentelemetry/semantic-conventions': 1.25.1 dev: false - /@opentelemetry/resources@1.27.0(@opentelemetry/api@1.9.0): - resolution: {integrity: sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - dev: false - /@opentelemetry/sdk-metrics@1.25.1(@opentelemetry/api@1.9.0): resolution: {integrity: sha512-9Mb7q5ioFL4E4dDrc4wC/A3NTHDat44v4I3p2pLPSxRvqUbDIQyMVr9uK+EU69+HWhlET1VaSrRzwdckWqY15Q==} engines: {node: '>=14'} @@ -5285,18 +5079,6 @@ packages: '@opentelemetry/semantic-conventions': 1.25.1 dev: false - /@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0): - resolution: {integrity: sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - dev: false - /@opentelemetry/semantic-conventions@1.25.1: resolution: {integrity: sha512-ZDjMJJQRlyk8A1KZFCc+bCbsyrn1wTwdNt56F7twdfUfnHUZUq77/WfONCj8p72NZOyP7pNTdUWSTYC3GTbuuQ==} engines: {node: '>=14'} @@ -5307,11 +5089,6 @@ packages: engines: {node: '>=14'} dev: false - /@opentelemetry/semantic-conventions@1.27.0: - resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} - engines: {node: '>=14'} - dev: false - /@opentelemetry/sql-common@0.40.1(@opentelemetry/api@1.9.0): resolution: {integrity: sha512-nSDlnHSqzC3pXn/wZEZVLuAuJ1MYMXPBwtv2qAbCa3847SaHItdE7SzUq/Jtb0KZmh1zfAbNi3AAMjztTT4Ugg==} engines: {node: '>=14'} @@ -5359,7 +5136,7 @@ packages: dependencies: playwright: 1.40.0 - /@pmmmwh/react-refresh-webpack-plugin@0.5.15(react-refresh@0.14.2)(webpack@5.95.0): + /@pmmmwh/react-refresh-webpack-plugin@0.5.15(react-refresh@0.14.2)(webpack@5.94.0): resolution: {integrity: sha512-LFWllMA55pzB9D34w/wXUCf8+c+IYKuJDgxiZ3qMhl64KRMBHYM1I3VdGaD2BV5FNPV2/S2596bppxHbv2ZydQ==} engines: {node: '>= 10.13'} peerDependencies: @@ -5393,7 +5170,7 @@ packages: react-refresh: 0.14.2 schema-utils: 4.2.0 source-map: 0.7.4 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) dev: true /@polka/url@1.0.0-next.25: @@ -6691,7 +6468,7 @@ packages: reselect: 4.1.8 dev: false - /@rollup/plugin-babel@6.0.4(@babel/core@7.26.0): + /@rollup/plugin-babel@6.0.4(@babel/core@7.25.7): resolution: {integrity: sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==} engines: {node: '>=14.0.0'} peerDependencies: @@ -6704,7 +6481,7 @@ packages: rollup: optional: true dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.25.7 '@babel/helper-module-imports': 7.22.15 '@rollup/pluginutils': 5.0.5(rollup@3.29.4) dev: false @@ -6924,7 +6701,7 @@ packages: '@sentry/utils': 8.26.0 dev: false - /@sentry/nextjs@8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.27.0)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.27.0)(next@14.2.13)(react@18.2.0)(webpack@5.95.0): + /@sentry/nextjs@8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.25.1)(next@14.2.13)(react@18.2.0)(webpack@5.94.0): resolution: {integrity: sha512-FO4xtYRpmtKpVt9kJsdcL73SoJbFkfZbHONh2kvGalCa06w8DCdHuzYvPgKaf8UcjEixeb0qiM9ncmPpoDsnHA==} engines: {node: '>=14.18'} peerDependencies: @@ -6939,18 +6716,18 @@ packages: '@rollup/plugin-commonjs': 26.0.1(rollup@3.29.4) '@sentry/core': 8.26.0 '@sentry/node': 8.26.0 - '@sentry/opentelemetry': 8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.27.0)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.27.0)(@opentelemetry/semantic-conventions@1.26.0) + '@sentry/opentelemetry': 8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.25.1)(@opentelemetry/semantic-conventions@1.26.0) '@sentry/react': 8.26.0(react@18.2.0) '@sentry/types': 8.26.0 '@sentry/utils': 8.26.0 '@sentry/vercel-edge': 8.26.0 - '@sentry/webpack-plugin': 2.20.1(webpack@5.95.0) + '@sentry/webpack-plugin': 2.20.1(webpack@5.94.0) chalk: 3.0.0 - next: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + next: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) resolve: 1.22.8 rollup: 3.29.4 stacktrace-parser: 0.1.10 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) transitivePeerDependencies: - '@opentelemetry/api' - '@opentelemetry/core' @@ -7020,26 +6797,6 @@ packages: '@sentry/utils': 8.26.0 dev: false - /@sentry/opentelemetry@8.26.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.27.0)(@opentelemetry/instrumentation@0.52.1)(@opentelemetry/sdk-trace-base@1.27.0)(@opentelemetry/semantic-conventions@1.26.0): - resolution: {integrity: sha512-HBDheM/+ysfIz8R1OH4bBIxdgD7ZbQkKLJAUXkdAbBcfbpK/CTtwcplbauF5wY7Q+GYvwL/ShuDwvXRfW+gFyQ==} - engines: {node: '>=14.18'} - peerDependencies: - '@opentelemetry/api': ^1.9.0 - '@opentelemetry/core': ^1.25.1 - '@opentelemetry/instrumentation': ^0.52.1 - '@opentelemetry/sdk-trace-base': ^1.25.1 - '@opentelemetry/semantic-conventions': ^1.25.1 - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/instrumentation': 0.52.1(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.26.0 - '@sentry/core': 8.26.0 - '@sentry/types': 8.26.0 - '@sentry/utils': 8.26.0 - dev: false - /@sentry/react@8.26.0(react@18.2.0): resolution: {integrity: sha512-dYoC0xzcqq8zmNMFoTWidhA7mVd3RDz/nAUn6C8yK/hkKA7bUknYCkhpESGLZfHaGwSKzeXRXKd/o/cgUVM9eA==} engines: {node: '>=14.18'} @@ -7075,7 +6832,7 @@ packages: '@sentry/utils': 8.26.0 dev: false - /@sentry/webpack-plugin@2.20.1(webpack@5.95.0): + /@sentry/webpack-plugin@2.20.1(webpack@5.94.0): resolution: {integrity: sha512-U6LzoE09Ndt0OCWROoRaZqqIHGxyMRdKpBhbqoBqyyfVwXN/zGW3I/cWZ1e8rreiKFj+2+c7+X0kOS+NGMTUrg==} engines: {node: '>= 14'} peerDependencies: @@ -7084,7 +6841,7 @@ packages: '@sentry/bundler-plugin-core': 2.20.1 unplugin: 1.0.1 uuid: 9.0.1 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) transitivePeerDependencies: - encoding - supports-color @@ -7122,8 +6879,8 @@ packages: '@sinonjs/commons': 1.8.6 dev: true - /@socket.io/component-emitter@3.1.2: - resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} + /@socket.io/component-emitter@3.1.0: + resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} dev: false /@stacks/auth@6.15.0: @@ -7139,19 +6896,16 @@ packages: - encoding dev: false - /@stacks/blockchain-api-client@7.12.0: - resolution: {integrity: sha512-N0Pxc8ZK0FQe4CtabDvs2oj2+9E0nrcCt3A3bx8QgZUWS7DPtIaqX3gK6aDSu0k8kD/v5lQQyVrISbNDAeygqQ==} + /@stacks/blockchain-api-client@8.2.2: + resolution: {integrity: sha512-bT5w4778hEkPaz+j6tXdwccBl5YTANol5A2Jdr4J5SMLclG8G4kHG8vaXZx6lufewUkvnK92woHd/q44vYVVPQ==} dependencies: - '@stacks/stacks-blockchain-api-types': 7.12.0 - '@types/ws': 7.4.7 - cross-fetch: 3.1.5 + '@types/node': 20.14.14 eventemitter3: 4.0.7 jsonrpc-lite: 2.2.0 - socket.io-client: 4.7.3 - ws: 8.16.0 + openapi-fetch: 0.10.6 + socket.io-client: 4.8.1 transitivePeerDependencies: - bufferutil - - encoding - supports-color - utf-8-validate dev: false @@ -7170,18 +6924,11 @@ packages: '@types/node': 18.18.12 dev: false - /@stacks/common@6.15.1-pr.e36e2015.5: - resolution: {integrity: sha512-TMpyBvtYU/Irc9u9PDb8mqKSQHVgGQKIZvzZF58Rg60xQ038bJ8JEqmxrGnP5sEPbyUEBH3BX5fcvkRCokww6g==} - dependencies: - '@types/bn.js': 5.1.5 - '@types/node': 18.19.60 - dev: false - - /@stacks/common@6.8.1: - resolution: {integrity: sha512-ewL9GLZNQYa5a/3K4xSHlHIgHkD4rwWW/QEaPId8zQIaL+1O9qCaF4LX9orNQeOmEk8kvG0x2xGV54fXKCZeWQ==} + /@stacks/common@6.16.0: + resolution: {integrity: sha512-PnzvhrdGRMVZvxTulitlYafSK4l02gPCBBoI9QEoTqgSnv62oaOXhYAUUkTMFKxdHW1seVEwZsrahuXiZPIAwg==} dependencies: '@types/bn.js': 5.1.5 - '@types/node': 18.19.60 + '@types/node': 18.18.12 dev: false /@stacks/connect-react@22.4.2(react-dom@18.2.0)(react@18.2.0): @@ -7211,7 +6958,7 @@ packages: '@stacks/connect-ui': 6.4.1 '@stacks/network': 6.13.0 '@stacks/profile': 6.9.0 - '@stacks/transactions': 6.9.0 + '@stacks/transactions': 6.15.0 jsontokens: 4.0.1 transitivePeerDependencies: - encoding @@ -7231,7 +6978,7 @@ packages: varuint-bitcoin: 1.1.2 dev: false - /@stacks/eslint-config@2.0.0(eslint-plugin-import@2.29.0)(eslint-plugin-prettier@5.0.1)(eslint-plugin-unused-imports@4.1.4)(eslint@8.54.0)(typescript@5.3.2): + /@stacks/eslint-config@2.0.0(eslint-plugin-import@2.29.0)(eslint-plugin-prettier@5.0.1)(eslint-plugin-unused-imports@3.0.0)(eslint@8.54.0)(typescript@5.3.2): resolution: {integrity: sha512-GrRiJE7nadre+wCGAkaxCmHGD8tEYOtVW/cjjMdh/H37yl3vGj/lX723MfiXj/YcQDJ1qs/8V9Rx9b4VsFp10Q==} peerDependencies: eslint: 8.54.0 @@ -7247,7 +6994,7 @@ packages: eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.12.0)(eslint-plugin-import@2.29.0)(eslint@8.54.0) eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.54.0) eslint-plugin-prettier: 5.0.1(eslint@8.54.0)(prettier@3.1.0) - eslint-plugin-unused-imports: 4.1.4(eslint@8.54.0) + eslint-plugin-unused-imports: 3.0.0(eslint@8.54.0) transitivePeerDependencies: - eslint-import-resolver-node - eslint-import-resolver-webpack @@ -7264,10 +7011,10 @@ packages: - encoding dev: false - /@stacks/network@6.15.1-pr.e36e2015.5: - resolution: {integrity: sha512-lk7YnXi6B/ycTvLlZdoPUv1nStTxhNfZ46IEu/eTYBdXYbw0c8JdNT62GEyaAYyXnxg/MFKNqGxRgJp2oYArsg==} + /@stacks/network@6.17.0: + resolution: {integrity: sha512-numHbfKjwco/rbkGPOEz8+FcJ2nBnS/tdJ8R422Q70h3SiA9eqk9RjSzB8p4JP8yW1SZvW+eihADHfMpBuZyfw==} dependencies: - '@stacks/common': 6.15.1-pr.e36e2015.5 + '@stacks/common': 6.16.0 cross-fetch: 3.1.8 transitivePeerDependencies: - encoding @@ -7295,9 +7042,9 @@ packages: /@stacks/profile@6.9.0: resolution: {integrity: sha512-sIR60DsAHi8C6zGqKqSe1r2hXTMHgwrJkX3fAaP3de40KeplZ2bkE+0B83yismEeU2baNc+AukyVvWJv0PfP0A==} dependencies: - '@stacks/common': 6.8.1 + '@stacks/common': 6.13.0 '@stacks/network': 6.13.0 - '@stacks/transactions': 6.9.0 + '@stacks/transactions': 6.15.0 jsontokens: 4.0.1 schema-inspector: 2.0.0 zone-file: 2.0.0-beta.3 @@ -7307,6 +7054,7 @@ packages: /@stacks/stacks-blockchain-api-types@7.12.0: resolution: {integrity: sha512-y76wTzp472m66qHEVvWErxopUqj8ZHYds+odyIjDciTG/u4YG1DwohaCPzgCP3X1fiB6qZ82wMt1VlivYwiuMQ==} + dev: true /@stacks/transactions@6.15.0: resolution: {integrity: sha512-P6XKDcqqycPy+KBJBw8+5N+u57D8moJN7msYdde1gYXERmvOo9ht/MNREWWQ7SAM7Nlhau5mpezCdYCzXOCilQ==} @@ -7327,20 +7075,7 @@ packages: '@noble/hashes': 1.1.5 '@noble/secp256k1': 1.7.1 '@stacks/common': 6.15.1-pr.0bcf867e.0 - '@stacks/network': 6.15.1-pr.e36e2015.5 - c32check: 2.0.0 - lodash.clonedeep: 4.5.0 - transitivePeerDependencies: - - encoding - dev: false - - /@stacks/transactions@6.9.0: - resolution: {integrity: sha512-hSs9+0Ew++GwMZMgPObOx0iVCQRxkiCqI+DHdPEikAmg2utpyLh2/txHOjfSIkQHvcBfJJ6O5KphmxDP4gUqiA==} - dependencies: - '@noble/hashes': 1.1.5 - '@noble/secp256k1': 1.7.1 - '@stacks/common': 6.8.1 - '@stacks/network': 6.13.0 + '@stacks/network': 6.17.0 c32check: 2.0.0 lodash.clonedeep: 4.5.0 transitivePeerDependencies: @@ -7681,7 +7416,7 @@ packages: recast: 0.23.9 semver: 7.6.3 util: 0.12.5 - ws: 8.17.1 + ws: 8.16.0 transitivePeerDependencies: - bufferutil - supports-color @@ -7756,7 +7491,7 @@ packages: storybook: 8.3.5 dev: true - /@storybook/nextjs@8.3.5(esbuild@0.23.1)(next@14.2.13)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2)(webpack@5.95.0): + /@storybook/nextjs@8.3.5(esbuild@0.23.1)(next@14.2.13)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2)(webpack@5.94.0): resolution: {integrity: sha512-YMjDSVd7BHIvj6oLMEFMKRvfZ83INxZinxtrx4ZZXGe+5iP8j7rcV7D67lxKQKWNy36d9Foj4pjT85yYj5s+ZQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -7785,38 +7520,38 @@ packages: '@babel/preset-react': 7.25.7(@babel/core@7.25.7) '@babel/preset-typescript': 7.25.7(@babel/core@7.25.7) '@babel/runtime': 7.25.7 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.95.0) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.94.0) '@storybook/builder-webpack5': 8.3.5(esbuild@0.23.1)(storybook@8.3.5)(typescript@5.3.2) '@storybook/preset-react-webpack': 8.3.5(@storybook/test@8.3.5)(esbuild@0.23.1)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2) '@storybook/react': 8.3.5(@storybook/test@8.3.5)(react-dom@18.2.0)(react@18.2.0)(storybook@8.3.5)(typescript@5.3.2) '@storybook/test': 8.3.5(storybook@8.3.5) '@types/node': 22.7.4 '@types/semver': 7.5.6 - babel-loader: 9.2.1(@babel/core@7.25.7)(webpack@5.95.0) - css-loader: 6.11.0(webpack@5.95.0) + babel-loader: 9.2.1(@babel/core@7.25.7)(webpack@5.94.0) + css-loader: 6.11.0(webpack@5.94.0) find-up: 5.0.0 fs-extra: 11.2.0 image-size: 1.1.1 loader-utils: 3.3.1 - next: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) - node-polyfill-webpack-plugin: 2.0.1(webpack@5.95.0) + next: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + node-polyfill-webpack-plugin: 2.0.1(webpack@5.94.0) pnp-webpack-plugin: 1.7.0(typescript@5.3.2) postcss: 8.4.47 - postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.3.2)(webpack@5.95.0) + postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.3.2)(webpack@5.94.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) react-refresh: 0.14.2 resolve-url-loader: 5.0.0 - sass-loader: 13.3.3(webpack@5.95.0) + sass-loader: 13.3.3(webpack@5.94.0) semver: 7.5.4 storybook: 8.3.5 - style-loader: 3.3.4(webpack@5.95.0) + style-loader: 3.3.4(webpack@5.94.0) styled-jsx: 5.1.6(@babel/core@7.25.7)(react@18.2.0) ts-dedent: 2.2.0 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.1.0 typescript: 5.3.2 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) optionalDependencies: sharp: 0.33.5 transitivePeerDependencies: @@ -7891,13 +7626,13 @@ packages: typescript: '>= 4.x' webpack: '>= 4' dependencies: - debug: 4.3.7 + debug: 4.3.6 endent: 2.1.0 find-cache-dir: 3.3.2 flat-cache: 3.2.0 micromatch: 4.0.5 react-docgen-typescript: 2.2.2(typescript@5.3.2) - tslib: 2.8.0 + tslib: 2.6.2 typescript: 5.3.2 webpack: 5.94.0(esbuild@0.23.1) transitivePeerDependencies: @@ -8001,14 +7736,14 @@ packages: /@swc/helpers@0.4.14: resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@swc/helpers@0.4.36: resolution: {integrity: sha512-5lxnyLEYFskErRPenYItLRSge5DjrJngYKdVjRSrWfza9G6KkgHEXi0vUZiyUeMU5JfXH1YnvXZzSp8ul88o2Q==} dependencies: legacy-swc-helpers: /@swc/helpers@0.4.14 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /@swc/helpers@0.5.3: @@ -8287,9 +8022,6 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - /@types/estree@1.0.6: - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - /@types/express-serve-static-core@4.17.41: resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} dependencies: @@ -8401,19 +8133,9 @@ packages: '@types/lodash': 4.14.202 dev: false - /@types/lodash.mergewith@4.6.9: - resolution: {integrity: sha512-fgkoCAOF47K7sxrQ7Mlud2TH023itugZs2bUg8h/KzT+BnZNrR2jAOmaokbLunHNnobXVWOezAeNn/lZqwxkcw==} - dependencies: - '@types/lodash': 4.17.12 - dev: false - /@types/lodash@4.14.202: resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} - /@types/lodash@4.17.12: - resolution: {integrity: sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==} - dev: false - /@types/mdx@2.0.13: resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} dev: true @@ -8442,8 +8164,8 @@ packages: undici-types: 5.26.5 dev: false - /@types/node@18.19.60: - resolution: {integrity: sha512-cYRj7igVqgxhlHFdBHHpU2SNw3+dN2x0VTZJtLYk6y/ieuGN4XiBgtDjYVktM/yk2y/8pKMileNc6IoEzEJnUw==} + /@types/node@20.14.14: + resolution: {integrity: sha512-d64f00982fS9YoOgJkAMolK7MN8Iq3TDdVjchbYHdEmjth/DHowx82GnoA+tVUAN+7vxfYUgAzi+JXbKNd2SDQ==} dependencies: undici-types: 5.26.5 dev: false @@ -8608,12 +8330,6 @@ packages: resolution: {integrity: sha512-+33x29mg+ecU88ODdWpqaie2upIuRkhujVLA7TuJjM823cNMbeggfI6NhxewaRaRF8dy+g33e4uIg/m5Mb3xDQ==} dev: true - /@types/ws@7.4.7: - resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - dependencies: - '@types/node': 20.9.4 - dev: false - /@types/yargs-parser@21.0.3: resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: true @@ -8700,7 +8416,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.12.0(typescript@5.3.2) '@typescript-eslint/utils': 6.12.0(eslint@8.54.0)(typescript@5.3.2) - debug: 4.3.7 + debug: 4.3.4 eslint: 8.54.0 ts-api-utils: 1.0.3(typescript@5.3.2) typescript: 5.3.2 @@ -8728,7 +8444,7 @@ packages: dependencies: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.7 + debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 semver: 7.6.3 @@ -8749,7 +8465,7 @@ packages: dependencies: '@typescript-eslint/types': 6.12.0 '@typescript-eslint/visitor-keys': 6.12.0 - debug: 4.3.7 + debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 @@ -9028,13 +8744,6 @@ packages: dependencies: acorn: 8.12.1 - /acorn-import-attributes@1.9.5(acorn@8.14.0): - resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} - peerDependencies: - acorn: ^8 - dependencies: - acorn: 8.14.0 - /acorn-jsx@5.3.2(acorn@7.4.1): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -9075,11 +8784,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - /acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} - hasBin: true - /adjust-sourcemap-loader@4.0.0: resolution: {integrity: sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==} engines: {node: '>=8.9'} @@ -9092,7 +8796,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.7 + debug: 4.3.6 transitivePeerDependencies: - supports-color @@ -9222,7 +8926,7 @@ packages: resolution: {integrity: sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==} engines: {node: '>=10'} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: false /aria-query@5.1.3: @@ -9240,7 +8944,7 @@ packages: /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 is-array-buffer: 3.0.2 /array-flatten@1.1.1: @@ -9295,11 +8999,11 @@ packages: /array.prototype.tosorted@1.1.2: resolution: {integrity: sha512-HuQCHOlk1Weat5jzStICBCd83NxiIMwqDg/dHEsoefabn/hJRj5pVdWcPUSpRrwhwxZOsQassMpgN/xRYFBMIg==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 dev: true /arraybuffer.prototype.slice@1.0.2: @@ -9307,10 +9011,10 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 @@ -9350,7 +9054,7 @@ packages: resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} engines: {node: '>=4'} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: true /astral-regex@2.0.0: @@ -9431,7 +9135,7 @@ packages: - supports-color dev: true - /babel-loader@9.2.1(@babel/core@7.25.7)(webpack@5.95.0): + /babel-loader@9.2.1(@babel/core@7.25.7)(webpack@5.94.0): resolution: {integrity: sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -9441,7 +9145,7 @@ packages: '@babel/core': 7.25.7 find-cache-dir: 4.0.0 schema-utils: 4.2.0 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) dev: true /babel-plugin-istanbul@6.1.1: @@ -9732,17 +9436,6 @@ packages: electron-to-chromium: 1.5.32 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) - dev: true - - /browserslist@4.24.2: - resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001673 - electron-to-chromium: 1.5.48 - node-releases: 2.0.18 - update-browserslist-db: 1.1.1(browserslist@4.24.2) /bs58@5.0.0: resolution: {integrity: sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==} @@ -9807,8 +9500,8 @@ packages: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 /call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} @@ -9828,7 +9521,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /camelcase-keys@6.2.2: @@ -9860,9 +9553,6 @@ packages: /caniuse-lite@1.0.30001667: resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==} - /caniuse-lite@1.0.30001673: - resolution: {integrity: sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==} - /case-sensitive-paths-webpack-plugin@2.4.0: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} engines: {node: '>=4'} @@ -10301,14 +9991,6 @@ packages: sha.js: 2.4.11 dev: true - /cross-fetch@3.1.5: - resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} - dependencies: - node-fetch: 2.6.7 - transitivePeerDependencies: - - encoding - dev: false - /cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} dependencies: @@ -10370,29 +10052,6 @@ packages: webpack: 5.94.0(esbuild@0.23.1) dev: true - /css-loader@6.11.0(webpack@5.95.0): - resolution: {integrity: sha512-CTJ+AEQJjq5NzLga5pE39qdiSV56F8ywCIsqNIRF0r7BDgWsN25aazToqAFg7ZrtA/U016xudB3ffgweORxX7g==} - engines: {node: '>= 12.13.0'} - peerDependencies: - '@rspack/core': 0.x || 1.x - webpack: ^5.0.0 - peerDependenciesMeta: - '@rspack/core': - optional: true - webpack: - optional: true - dependencies: - icss-utils: 5.1.0(postcss@8.4.47) - postcss: 8.4.47 - postcss-modules-extract-imports: 3.1.0(postcss@8.4.47) - postcss-modules-local-by-default: 4.0.5(postcss@8.4.47) - postcss-modules-scope: 3.2.0(postcss@8.4.47) - postcss-modules-values: 4.0.0(postcss@8.4.47) - postcss-value-parser: 4.2.0 - semver: 7.5.4 - webpack: 5.95.0(esbuild@0.23.1) - dev: true - /css-select@4.3.0: resolution: {integrity: sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==} dependencies: @@ -10582,18 +10241,6 @@ packages: optional: true dependencies: ms: 2.1.2 - dev: true - - /debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 /decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} @@ -10630,9 +10277,9 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.7 + call-bind: 1.0.5 es-get-iterator: 1.1.3 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 is-arguments: 1.1.1 is-array-buffer: 3.0.2 is-date-object: 1.0.5 @@ -10643,7 +10290,7 @@ packages: object-keys: 1.1.1 object.assign: 4.1.4 regexp.prototype.flags: 1.5.1 - side-channel: 1.0.6 + side-channel: 1.0.4 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 which-typed-array: 1.1.13 @@ -10680,6 +10327,14 @@ packages: titleize: 3.0.0 dev: true + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + /define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -10702,8 +10357,8 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 + define-data-property: 1.1.1 + has-property-descriptors: 1.0.1 object-keys: 1.1.1 /delayed-stream@1.0.0: @@ -10846,7 +10501,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /dot-prop@5.3.0: @@ -10887,10 +10542,6 @@ packages: /electron-to-chromium@1.5.32: resolution: {integrity: sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==} - dev: true - - /electron-to-chromium@1.5.48: - resolution: {integrity: sha512-FXULnNK7ACNI9MTMOVAzUGiz/YrK9Kcb0s/JT4aJgsam7Eh6XYe7Y6q95lPq+VdBe1DpT2eTnfXFtnuPGCks4w==} /elliptic@6.5.7: resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} @@ -10932,22 +10583,22 @@ packages: objectorarray: 1.0.5 dev: true - /engine.io-client@6.5.4: - resolution: {integrity: sha512-GeZeeRjpD2qf49cZQ0Wvh/8NJNfeXkXXcoGh+F77oEAgo9gUHwT1fCRxSNU+YEEaysOJTnsFHmM5oAcPy4ntvQ==} + /engine.io-client@6.6.2: + resolution: {integrity: sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw==} dependencies: - '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 - engine.io-parser: 5.2.3 + '@socket.io/component-emitter': 3.1.0 + debug: 4.3.6 + engine.io-parser: 5.2.1 ws: 8.17.1 - xmlhttprequest-ssl: 2.0.0 + xmlhttprequest-ssl: 2.1.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate dev: false - /engine.io-parser@5.2.3: - resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} + /engine.io-parser@5.2.1: + resolution: {integrity: sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==} engines: {node: '>=10.0.0'} dev: false @@ -11005,15 +10656,15 @@ packages: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.7 + call-bind: 1.0.5 es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has-property-descriptors: 1.0.2 + has-property-descriptors: 1.0.1 has-proto: 1.0.1 has-symbols: 1.0.3 hasown: 2.0.0 @@ -11055,8 +10706,8 @@ packages: /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -11070,12 +10721,12 @@ packages: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} dependencies: asynciterator.prototype: 1.0.0 - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 es-set-tostringtag: 2.0.2 function-bind: 1.1.2 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 globalthis: 1.0.3 has-property-descriptors: 1.0.1 has-proto: 1.0.1 @@ -11092,7 +10743,7 @@ packages: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 hasown: 2.0.0 @@ -11114,7 +10765,7 @@ packages: peerDependencies: esbuild: '>=0.12 <1' dependencies: - debug: 4.3.7 + debug: 4.3.6 esbuild: 0.23.1 transitivePeerDependencies: - supports-color @@ -11462,16 +11113,23 @@ packages: - typescript dev: true - /eslint-plugin-unused-imports@4.1.4(eslint@8.54.0): - resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} + /eslint-plugin-unused-imports@3.0.0(eslint@8.54.0): + resolution: {integrity: sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 + '@typescript-eslint/eslint-plugin': ^6.0.0 eslint: 8.54.0 peerDependenciesMeta: '@typescript-eslint/eslint-plugin': optional: true dependencies: eslint: 8.54.0 + eslint-rule-composer: 0.3.0 + dev: true + + /eslint-rule-composer@0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} dev: true /eslint-scope@5.1.1: @@ -11844,7 +11502,7 @@ packages: resolution: {integrity: sha512-a8Ge6cdKh9za/GZR/qtigTAk7SrGore56EFcoMshClsh7FLk1zwszc/ltuMfKhx56qeuyL/jWQ4J4axou0iJ9w==} engines: {node: '>=10'} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: false /follow-redirects@1.15.6: @@ -12017,7 +11675,7 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 functions-have-names: 1.2.3 @@ -12079,8 +11737,8 @@ packages: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 /get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} @@ -12240,8 +11898,7 @@ packages: /has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: - get-intrinsic: 1.2.4 - dev: true + get-intrinsic: 1.2.2 /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -12429,7 +12086,7 @@ packages: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.4 transitivePeerDependencies: - supports-color dev: true @@ -12447,7 +12104,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.4 transitivePeerDependencies: - supports-color @@ -12571,9 +12228,9 @@ packages: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 hasown: 2.0.0 - side-channel: 1.0.6 + side-channel: 1.0.4 /internmap@2.0.3: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} @@ -12586,7 +12243,7 @@ packages: '@formatjs/ecma402-abstract': 1.18.0 '@formatjs/fast-memoize': 2.2.0 '@formatjs/icu-messageformat-parser': 2.7.3 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /invariant@2.2.4: @@ -12632,8 +12289,8 @@ packages: /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-typed-array: 1.1.12 /is-arrayish@0.2.1: @@ -12667,7 +12324,7 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 has-tostringtag: 1.0.0 /is-callable@1.2.7: @@ -12704,7 +12361,7 @@ packages: /is-finalizationregistry@1.0.2: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 dev: true /is-fullwidth-code-point@3.0.0: @@ -12800,7 +12457,7 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 has-tostringtag: 1.0.0 /is-regexp@1.0.0: @@ -12815,7 +12472,7 @@ packages: /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} @@ -12864,13 +12521,13 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 /is-weakset@2.0.2: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 dev: true /is-wsl@2.2.0: @@ -12933,7 +12590,7 @@ packages: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: - debug: 4.3.7 + debug: 4.3.6 istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: @@ -12952,7 +12609,7 @@ packages: resolution: {integrity: sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==} dependencies: define-properties: 1.2.1 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 reflect.getprototypeof: 1.0.4 set-function-name: 2.0.1 @@ -13503,7 +13160,7 @@ packages: whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 11.0.0 - ws: 8.17.1 + ws: 8.14.2 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -13805,7 +13462,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: true /lru-cache@10.4.3: @@ -14065,7 +13722,7 @@ packages: onigasm: 2.2.5 dev: false - /monaco-vscode-textmate-theme-converter@0.1.7(tslib@2.8.0): + /monaco-vscode-textmate-theme-converter@0.1.7(tslib@2.6.2): resolution: {integrity: sha512-ZMsq1RPWwOD3pvXD0n+9ddnhfzZoiUMwNIWPNUqYqEiQeH2HjyZ9KYOdt/pqe0kkN8WnYWLrxT9C/SrtIsAu2Q==} hasBin: true peerDependencies: @@ -14073,7 +13730,7 @@ packages: dependencies: commander: 8.3.0 fs-extra: 7.0.1 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /monacode@0.3.1: @@ -14135,11 +13792,11 @@ packages: next: '>=10.0.0' react: '>=17.0.0' dependencies: - next: 14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) + next: 14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 dev: true - /next@14.2.13(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0): + /next@14.2.13(@babel/core@7.25.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.40.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-BseY9YNw8QJSwLYD7hlZzl6QVDoSFHL/URN5K64kVEVpCsSOWeyjbIGK+dZUaRViHTaMQX8aqmnn0PHBbGZezg==} engines: {node: '>=18.17.0'} hasBin: true @@ -14167,7 +13824,7 @@ packages: postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.26.0)(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.25.7)(react@18.2.0) optionalDependencies: '@next/swc-darwin-arm64': 14.2.13 '@next/swc-darwin-x64': 14.2.13 @@ -14186,25 +13843,13 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} dev: true - /node-fetch@2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - /node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -14221,7 +13866,7 @@ packages: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true - /node-polyfill-webpack-plugin@2.0.1(webpack@5.95.0): + /node-polyfill-webpack-plugin@2.0.1(webpack@5.94.0): resolution: {integrity: sha512-ZUMiCnZkP1LF0Th2caY6J/eKKoA0TefpoVa68m/LQU1I/mE8rGt4fNYGgNuCcK+aG8P8P43nbeJ2RqJMOL/Y1A==} engines: {node: '>=12'} peerDependencies: @@ -14252,7 +13897,7 @@ packages: url: 0.11.4 util: 0.12.5 vm-browserify: 1.1.2 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) dev: true /node-releases@2.0.13: @@ -14330,7 +13975,7 @@ packages: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 dev: true @@ -14346,7 +13991,7 @@ packages: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -14355,7 +14000,7 @@ packages: resolution: {integrity: sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 dev: true @@ -14457,6 +14102,16 @@ packages: is-wsl: 2.2.0 dev: true + /openapi-fetch@0.10.6: + resolution: {integrity: sha512-6xXfvIEL/POtLGOaFPsp3O+pDe+J3DZYxbD9BrsQHXOTeNK8z/gsWHT6adUy1KcpQOhmkerMzlQrJM6DbN55dQ==} + dependencies: + openapi-typescript-helpers: 0.0.11 + dev: false + + /openapi-typescript-helpers@0.0.11: + resolution: {integrity: sha512-xofUHlVFq+BMquf3nh9I8N2guHckW6mrDO/F3kaFgrL7MGbjldDnQ9TIT+rkH/+H0LiuO+RuZLnNmsJwsjwUKg==} + dev: false + /opener@1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true @@ -14567,7 +14222,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /parent-module@1.0.1: @@ -14611,7 +14266,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /path-browserify@1.0.1: @@ -14700,9 +14355,6 @@ packages: /picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} - /picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -14767,7 +14419,7 @@ packages: '@babel/runtime': 7.23.4 dev: true - /postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.3.2)(webpack@5.95.0): + /postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.3.2)(webpack@5.94.0): resolution: {integrity: sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==} engines: {node: '>= 18.12.0'} peerDependencies: @@ -14784,7 +14436,7 @@ packages: jiti: 1.21.6 postcss: 8.4.47 semver: 7.5.4 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) transitivePeerDependencies: - typescript dev: true @@ -14881,25 +14533,25 @@ packages: xtend: 4.0.2 dev: false - /preact-render-to-string@5.1.19(preact@10.24.3): + /preact-render-to-string@5.1.19(preact@10.19.3): resolution: {integrity: sha512-bj8sn/oytIKO6RtOGSS/1+5CrQyRSC99eLUnEVbqUa6MzJX5dYh7wu9bmT0d6lm/Vea21k9KhCQwvr2sYN3rrQ==} peerDependencies: preact: '>=10' dependencies: - preact: 10.24.3 + preact: 10.19.3 pretty-format: 3.8.0 dev: false - /preact-ssr-prepass@1.2.1(preact@10.24.3): + /preact-ssr-prepass@1.2.1(preact@10.19.3): resolution: {integrity: sha512-bLgbUfy8nL+PZghAPpyk9MF+cmXjdwEnxYPaJBmwbzFQqzIz8dQVBqjwB60RqZ9So/vIf6BRfHCiwFGuMCyfbQ==} peerDependencies: preact: '>=10 || ^10.0.0-beta.0 || ^10.0.0-alpha.0' dependencies: - preact: 10.24.3 + preact: 10.19.3 dev: false - /preact@10.24.3: - resolution: {integrity: sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==} + /preact@10.19.3: + resolution: {integrity: sha512-nHHTeFVBTHRGxJXKkKu5hT8C/YWBkPso4/Gad6xuj5dbptt9iF9NZr9pHbPhBrnT2klheu7mHTxTZ/LjwJiEiQ==} dev: false /prelude-ls@1.2.1: @@ -15194,12 +14846,12 @@ packages: universal-cookie: 6.1.1 dev: false - /react-countup@6.4.2(@babel/core@7.26.0)(react@18.2.0): + /react-countup@6.4.2(@babel/core@7.25.7)(react@18.2.0): resolution: {integrity: sha512-wdDrNb2lPFGbLb+i0FTgswPbWziubS6KZRII8NRpXmUCoZsi15PFbIHgBz60Dyxd4KPuRvwsK5aawIU4OPP3jA==} peerDependencies: react: '>= 16.3.0' dependencies: - '@rollup/plugin-babel': 6.0.4(@babel/core@7.26.0) + '@rollup/plugin-babel': 6.0.4(@babel/core@7.25.7) countup.js: 2.8.0 react: 18.2.0 transitivePeerDependencies: @@ -15422,7 +15074,7 @@ packages: '@types/react': 18.2.0 react: 18.2.0 react-style-singleton: 2.2.1(@types/react@18.2.0)(react@18.2.0) - tslib: 2.8.0 + tslib: 2.6.2 dev: false /react-remove-scroll@2.5.7(@types/react@18.2.0)(react@18.2.0): @@ -15439,7 +15091,7 @@ packages: react: 18.2.0 react-remove-scroll-bar: 2.3.4(@types/react@18.2.0)(react@18.2.0) react-style-singleton: 2.2.1(@types/react@18.2.0)(react@18.2.0) - tslib: 2.8.0 + tslib: 2.6.2 use-callback-ref: 1.3.0(@types/react@18.2.0)(react@18.2.0) use-sidecar: 1.1.2(@types/react@18.2.0)(react@18.2.0) dev: false @@ -15491,7 +15143,7 @@ packages: get-nonce: 1.0.1 invariant: 2.2.4 react: 18.2.0 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /react-test-renderer@18.2.0(react@18.2.0): @@ -15598,7 +15250,7 @@ packages: esprima: 4.0.1 source-map: 0.6.1 tiny-invariant: 1.3.3 - tslib: 2.8.0 + tslib: 2.6.2 dev: true /recharts-scale@0.4.5: @@ -15664,10 +15316,10 @@ packages: resolution: {integrity: sha512-ECkTw8TmJwW60lOTR+ZkODISW6RQ8+2CL3COqtiJKLd6MmB45hN51HprHFziKLGkAuTGQhBb91V8cy+KHlaCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 globalthis: 1.0.3 which-builtin-type: 1.1.3 dev: true @@ -15700,7 +15352,7 @@ packages: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 set-function-name: 2.0.1 @@ -15777,7 +15429,7 @@ packages: resolution: {integrity: sha512-X34iHADNbNDfr6OTStIAHWSAvvKQRYgLO6duASaVf7J2VA3lvmNYboAHOuLC2huav1IwgZJtyEcJCKVzFxOSMQ==} engines: {node: '>=8.6.0'} dependencies: - debug: 4.3.7 + debug: 4.3.6 module-details-from-path: 1.0.3 resolve: 1.22.8 transitivePeerDependencies: @@ -15917,15 +15569,15 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.8.0 + tslib: 2.6.2 dev: true /safe-array-concat@1.0.1: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 @@ -15938,14 +15590,14 @@ packages: /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-regex: 1.1.4 /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /sass-loader@13.3.3(webpack@5.95.0): + /sass-loader@13.3.3(webpack@5.94.0): resolution: {integrity: sha512-mt5YN2F1MOZr3d/wBRcZxeFgwgkH44wVc2zohO2YF6JiOMkiXe4BYRZpSu2sO1g71mo/j16txzUhsKZlqjVGzA==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -15965,7 +15617,7 @@ packages: optional: true dependencies: neo-async: 2.6.2 - webpack: 5.95.0(esbuild@0.23.1) + webpack: 5.94.0(esbuild@0.23.1) dev: true /saxes@6.0.0: @@ -16082,6 +15734,15 @@ packages: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} dev: false + /set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -16097,9 +15758,9 @@ packages: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.4 + define-data-property: 1.1.1 functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 + has-property-descriptors: 1.0.1 /setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} @@ -16164,8 +15825,8 @@ packages: /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 object-inspect: 1.13.1 /side-channel@1.0.6: @@ -16229,13 +15890,13 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /socket.io-client@4.7.3: - resolution: {integrity: sha512-nU+ywttCyBitXIl9Xe0RSEfek4LneYkJxCeNnKCuhwoH4jGXO1ipIUw/VA/+Vvv2G1MTym11fzFC0SxkrcfXDw==} + /socket.io-client@4.8.1: + resolution: {integrity: sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 - engine.io-client: 6.5.4 + '@socket.io/component-emitter': 3.1.0 + debug: 4.3.6 + engine.io-client: 6.6.2 socket.io-parser: 4.2.4 transitivePeerDependencies: - bufferutil @@ -16247,8 +15908,8 @@ packages: resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.2 - debug: 4.3.7 + '@socket.io/component-emitter': 3.1.0 + debug: 4.3.6 transitivePeerDependencies: - supports-color dev: false @@ -16429,10 +16090,10 @@ packages: /string.prototype.matchall@4.0.10: resolution: {integrity: sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.4 + get-intrinsic: 1.2.2 has-symbols: 1.0.3 internal-slot: 1.0.6 regexp.prototype.flags: 1.5.1 @@ -16444,21 +16105,21 @@ packages: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 @@ -16544,16 +16205,7 @@ packages: webpack: 5.94.0(esbuild@0.23.1) dev: true - /style-loader@3.3.4(webpack@5.95.0): - resolution: {integrity: sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==} - engines: {node: '>= 12.13.0'} - peerDependencies: - webpack: ^5.0.0 - dependencies: - webpack: 5.95.0(esbuild@0.23.1) - dev: true - - /styled-jsx@5.1.1(@babel/core@7.26.0)(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.25.7)(react@18.2.0): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -16566,7 +16218,7 @@ packages: babel-plugin-macros: optional: true dependencies: - '@babel/core': 7.26.0 + '@babel/core': 7.25.7 client-only: 0.0.1 react: 18.2.0 @@ -16689,31 +16341,6 @@ packages: serialize-javascript: 6.0.2 terser: 5.31.6 webpack: 5.94.0(esbuild@0.23.1) - dev: true - - /terser-webpack-plugin@5.3.10(esbuild@0.23.1)(webpack@5.95.0): - resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} - engines: {node: '>= 10.13.0'} - peerDependencies: - '@swc/core': '*' - esbuild: '*' - uglify-js: '*' - webpack: ^5.1.0 - peerDependenciesMeta: - '@swc/core': - optional: true - esbuild: - optional: true - uglify-js: - optional: true - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - esbuild: 0.23.1 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.2 - terser: 5.31.6 - webpack: 5.95.0(esbuild@0.23.1) /terser@5.31.6: resolution: {integrity: sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==} @@ -16935,9 +16562,6 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tslib@2.8.0: - resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} - /tsutils@3.21.0(typescript@5.3.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -17016,15 +16640,15 @@ packages: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-typed-array: 1.1.12 /typed-array-byte-length@1.0.0: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -17034,7 +16658,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.7 + call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 @@ -17042,7 +16666,7 @@ packages: /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 for-each: 0.3.3 is-typed-array: 1.1.12 @@ -17054,7 +16678,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.7 + call-bind: 1.0.5 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -17198,17 +16822,6 @@ packages: browserslist: 4.24.0 escalade: 3.2.0 picocolors: 1.1.0 - dev: true - - /update-browserslist-db@1.1.1(browserslist@4.24.2): - resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.24.2 - escalade: 3.2.0 - picocolors: 1.1.0 /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -17242,7 +16855,7 @@ packages: dependencies: '@types/react': 18.2.0 react: 18.2.0 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /use-events@1.4.2(react@18.2.0): @@ -17267,7 +16880,7 @@ packages: '@types/react': 18.2.0 detect-node-es: 1.1.0 react: 18.2.0 - tslib: 2.8.0 + tslib: 2.6.2 dev: false /use-sync-external-store@1.2.0(react@18.2.0): @@ -17491,45 +17104,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true - - /webpack@5.95.0(esbuild@0.23.1): - resolution: {integrity: sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - peerDependencies: - webpack-cli: '*' - peerDependenciesMeta: - webpack-cli: - optional: true - dependencies: - '@types/estree': 1.0.6 - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/wasm-edit': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.14.0 - acorn-import-attributes: 1.9.5(acorn@8.14.0) - browserslist: 4.24.2 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.17.1 - es-module-lexer: 1.5.4 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(esbuild@0.23.1)(webpack@5.95.0) - watchpack: 2.4.2 - webpack-sources: 3.2.3 - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js /whatwg-encoding@2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} @@ -17665,6 +17239,19 @@ packages: optional: true dev: false + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + /ws@8.16.0: resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} engines: {node: '>=10.0.0'} @@ -17676,7 +17263,7 @@ packages: optional: true utf-8-validate: optional: true - dev: false + dev: true /ws@8.17.1: resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} @@ -17689,6 +17276,7 @@ packages: optional: true utf-8-validate: optional: true + dev: false /xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} @@ -17699,8 +17287,8 @@ packages: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} dev: true - /xmlhttprequest-ssl@2.0.0: - resolution: {integrity: sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A==} + /xmlhttprequest-ssl@2.1.2: + resolution: {integrity: sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==} engines: {node: '>=0.4.0'} dev: false diff --git a/src/api/getApiClient.ts b/src/api/getApiClient.ts new file mode 100644 index 000000000..b7f2baac3 --- /dev/null +++ b/src/api/getApiClient.ts @@ -0,0 +1,20 @@ +import { createClient } from '@stacks/blockchain-api-client'; + +import packageJson from '../../package.json'; +import { RELEASE_TAG_NAME } from '../common/constants/env'; + +export const getApiClient = (baseUrl: string) => { + const apiClient = createClient({ + baseUrl, + }); + + apiClient.use({ + onRequest({ request }) { + request.headers.set('x-hiro-product', 'explorer'); + request.headers.set('x-hiro-version', RELEASE_TAG_NAME || packageJson.version); + return request; + }, + }); + + return apiClient; +}; diff --git a/src/api/getErrorMessage.ts b/src/api/getErrorMessage.ts new file mode 100644 index 000000000..ef6df2cc4 --- /dev/null +++ b/src/api/getErrorMessage.ts @@ -0,0 +1,3 @@ +export function getErrorMessage(error: any) { + return error?.message || 'Something went wrong! Please try again later.'; +} diff --git a/src/api/useApiClient.ts b/src/api/useApiClient.ts new file mode 100644 index 000000000..821bc2727 --- /dev/null +++ b/src/api/useApiClient.ts @@ -0,0 +1,7 @@ +import { useGlobalContext } from '../common/context/useGlobalContext'; +import { getApiClient } from './getApiClient'; + +export function useApiClient() { + const baseUrl = useGlobalContext().activeNetworkKey; + return getApiClient(baseUrl); +} diff --git a/src/api/useGetQueryFn.ts b/src/api/useGetQueryFn.ts new file mode 100644 index 000000000..6b8b7fe29 --- /dev/null +++ b/src/api/useGetQueryFn.ts @@ -0,0 +1,20 @@ +import { useApiClient } from './useApiClient'; + +export function useGetQueryFn(path: string) { + const apiClient = useApiClient(); + return apiClient.GET('/extended/v2/blocks/{height_or_hash}/transactions', { + params: { + path: { height_or_hash: 2000 }, + query: { limit: 20, offset: 100 }, + }, + }); +} + +export function useGetTransactionsQueryFn() { + return useApiClient().GET('/extended/v2/blocks/{height_or_hash}/transactions', { + params: { + path: { height_or_hash: 2000 }, + query: { limit: 20, offset: 100 }, + }, + }); +} diff --git a/src/api/useQuery.ts b/src/api/useQuery.ts new file mode 100644 index 000000000..6fcdff9d3 --- /dev/null +++ b/src/api/useQuery.ts @@ -0,0 +1,12 @@ +import { + QueryKey, + UseQueryOptions, + UseQueryResult, + useQuery as tanstackUseQuery, +} from '@tanstack/react-query'; + +export function useQuery( + options: UseQueryOptions +): UseQueryResult { + return tanstackUseQuery(options); +} diff --git a/src/app/_components/BlockList/data/useAverageBlockTimes.ts b/src/app/_components/BlockList/data/useAverageBlockTimes.ts index 36c0e6401..d70973e2b 100644 --- a/src/app/_components/BlockList/data/useAverageBlockTimes.ts +++ b/src/app/_components/BlockList/data/useAverageBlockTimes.ts @@ -1,6 +1,7 @@ import { UseSuspenseQueryResult, useSuspenseQuery } from '@tanstack/react-query'; -import { useApi } from '../../../../common/api/useApi'; +import { getErrorMessage } from '../../../../api/getErrorMessage'; +import { useApiClient } from '../../../../api/useApiClient'; const AVERAGE_BLOCK_TIMES_QUERY_KEY = '/extended/v2/blocks/average-times'; @@ -12,10 +13,16 @@ interface AverageBlockTimesResponse { } export function useSuspenseAverageBlockTimes(): UseSuspenseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseQuery({ queryKey: [AVERAGE_BLOCK_TIMES_QUERY_KEY], - queryFn: () => api.blocksApi.getAverageBlockTimes(), + queryFn: async () => { + const { data, error } = await apiClient.GET('/extended/v2/blocks/average-times'); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: 30 * 60 * 1000, }); } diff --git a/src/app/address/[principal]/PageClient.tsx b/src/app/address/[principal]/PageClient.tsx index ddb78aa73..8fc7bc1ee 100644 --- a/src/app/address/[principal]/PageClient.tsx +++ b/src/app/address/[principal]/PageClient.tsx @@ -25,7 +25,7 @@ export function AddressPageLayout(props: GridProps) { } export default function AddressPage({ params: { principal } }: any) { - const { data: balance } = useSuspenseAccountBalance(principal, { refetchOnWindowFocus: true }); + const { data: balance } = useSuspenseAccountBalance(principal); const { data: nonces } = useAddressNonces({ address: principal }); const hasTokenBalances = hasTokenBalance(balance); diff --git a/src/app/block/[hash]/PageClient.tsx b/src/app/block/[hash]/PageClient.tsx index bdccd01e4..fde2ac2d2 100644 --- a/src/app/block/[hash]/PageClient.tsx +++ b/src/app/block/[hash]/PageClient.tsx @@ -35,10 +35,9 @@ const BlockTxsList = dynamic( ); export default function BlockPage({ params: { hash } }: any) { - const { data: block } = useSuspenseBlockByHeightOrHash(hash, { refetchOnWindowFocus: true }); + const { data: block } = useSuspenseBlockByHeightOrHash(hash); const title = (block && `STX Block #${block.height.toLocaleString()}`) || ''; const { isOpen, onToggle, onClose } = useDisclosure(); - // const { data: signerMetricsBlock } = useSignerMetricsBlock(hash); return ( <> {title} @@ -65,46 +64,6 @@ export default function BlockPage({ params: { hash } }: any) { value={{block.tenure_height}} /> )} - {/* - {signerMetricsBlock?.signer_data - ? `${signerMetricsBlock?.signer_data?.average_response_time_ms / 1_000}s` - : '-'} - - } - /> - - {signerMetricsBlock?.signer_data - ? `${signerMetricsBlock?.signer_data?.accepted_weight}%` - : '-'} - - } - /> - - {signerMetricsBlock?.signer_data - ? `${signerMetricsBlock?.signer_data?.rejected_weight}%` - : '-'} - - } - /> - - {signerMetricsBlock?.signer_data - ? `${signerMetricsBlock?.signer_data?.missing_weight}%` - : '-'} - - } - /> */} {!block.canonical ? ( ; totalTxCount: number; }) { const pieData = Object.entries(filteredTxTypeCounts) diff --git a/src/app/transactions/MempoolFeeStats.tsx b/src/app/transactions/MempoolFeeStats.tsx index d2b538ccc..cc4b566c2 100644 --- a/src/app/transactions/MempoolFeeStats.tsx +++ b/src/app/transactions/MempoolFeeStats.tsx @@ -7,8 +7,7 @@ import { } from '@phosphor-icons/react'; import { useMemo, useState } from 'react'; -import { MempoolFeePriorities } from '@stacks/blockchain-api-client/src/generated/models'; -import { MempoolFeePrioritiesAll } from '@stacks/blockchain-api-client/src/generated/models/MempoolFeePrioritiesAll'; +import { MempoolFeePriorities } from '@stacks/stacks-blockchain-api-types/generated'; import { Card } from '../../common/components/Card'; import { getTxTypeIcon } from '../../common/components/TxIcon'; @@ -30,7 +29,7 @@ import { mapTransactionTypeToFilterValue, } from './TransactionTypeFilterMenu'; -export const getFeePriorityIcon = (priority: keyof MempoolFeePrioritiesAll) => { +export const getFeePriorityIcon = (priority: keyof MempoolFeePriorities['all']) => { switch (priority) { case 'no_priority': return ; @@ -52,14 +51,16 @@ function MempoolFeePriorityCard({ txTypeFilter, }: { mempoolFeeResponse: MempoolFeePriorities; - priority: keyof MempoolFeePrioritiesAll; + priority: keyof MempoolFeePriorities['all']; stxPrice: number; txTypeFilter: TransactionTypeFilterTypes; } & FlexProps) { const borderColor = useColorModeValue('slate.200', 'slate.800'); const isTxTypeFiltered = txTypeFilter !== TransactionTypeFilterTypes.AverageForAllTransactions; const mempoolFeeAll = isTxTypeFiltered - ? mempoolFeeResponse?.[mapTransactionTypeToFilterValue(txTypeFilter)]?.[priority] || 0 + ? mempoolFeeResponse?.[ + mapTransactionTypeToFilterValue(txTypeFilter) as keyof MempoolFeePriorities + ]?.[priority] || 0 : mempoolFeeResponse?.all?.[priority] || 0; const mempoolFeeTokenTransfer = mempoolFeeResponse?.token_transfer?.[priority] || 0; const mempoolFeeContractCall = mempoolFeeResponse?.contract_call?.[priority] || 0; @@ -239,7 +240,7 @@ export function MempoolFeeStats({ tokenPrice }: { tokenPrice: TokenPrice }) { {Object.entries(filteredTxTypeCounts).map(([key, value]) => { - const icon = getTxTypeIcon(key as keyof typeof filteredTxTypeCounts); + const icon = getTxTypeIcon(key as any); const text = key === 'token_transfer' ? 'Token transfer' diff --git a/src/app/transactions/TransactionTypeFilterMenu.tsx b/src/app/transactions/TransactionTypeFilterMenu.tsx index 6ff93f2ab..7c68a856a 100644 --- a/src/app/transactions/TransactionTypeFilterMenu.tsx +++ b/src/app/transactions/TransactionTypeFilterMenu.tsx @@ -1,6 +1,6 @@ import { useCallback, useMemo } from 'react'; -import { MempoolFeePriorities } from '@stacks/blockchain-api-client'; +import { MempoolFeePriorities } from '@stacks/stacks-blockchain-api-types/generated'; import { FilterMenu } from '../../common/components/FilterMenu'; diff --git a/src/common/api/client.ts b/src/common/api/client.ts deleted file mode 100644 index 786fa3c92..000000000 --- a/src/common/api/client.ts +++ /dev/null @@ -1,87 +0,0 @@ -'use client'; - -import { TokensApi } from '@hirosystems/token-metadata-api-client'; -import { Configuration as TokenMetadataApiConfiguration } from '@hirosystems/token-metadata-api-client/dist/configuration'; - -import { - AccountsApi, - BlocksApi, - BurnBlocksApi, - Configuration, - FaucetsApi, - FeesApi, - InfoApi, - MempoolApi, - MicroblocksApi, - Middleware, - NonFungibleTokensApi, - RequestContext, - RosettaApi, - SearchApi, - SmartContractsApi, - TransactionsApi, -} from '@stacks/blockchain-api-client'; - -import { MICROBLOCKS_ENABLED } from '../constants/constants'; -import { fetcher as fetchApi } from './fetch'; - -export function apiClients( - config: Configuration, - tokenMetadataApiConfig?: TokenMetadataApiConfiguration -) { - const smartContractsApi = new SmartContractsApi(config); - const accountsApi = new AccountsApi(config); - const infoApi = new InfoApi(config); - const transactionsApi = new TransactionsApi(config); - const microblocksApi = new MicroblocksApi(config); - const blocksApi = new BlocksApi(config); - const burnBlocksApi = new BurnBlocksApi(config); - const faucetsApi = new FaucetsApi(config); - const feesApi = new FeesApi(config); - const searchApi = new SearchApi(config); - const rosettaApi = new RosettaApi(config); - const nonFungibleTokensApi = new NonFungibleTokensApi(config); - const mempoolApi = new MempoolApi(config); - const tokenMetadataApi = tokenMetadataApiConfig - ? new TokensApi(tokenMetadataApiConfig) - : undefined; - - return { - smartContractsApi, - accountsApi, - infoApi, - transactionsApi, - microblocksApi, - blocksApi, - burnBlocksApi, - faucetsApi, - feesApi, - searchApi, - rosettaApi, - nonFungibleTokensApi, - mempoolApi, - tokenMetadataApi, - config, - }; -} - -// this is used to enable automatic passing of `unanchored=true` to all requests -const unanchoredMiddleware: Middleware = { - pre: (context: RequestContext) => { - const url = new URL(context.url); - if (!url.toString().includes('/v2')) url.searchParams.set('unanchored', 'true'); - return Promise.resolve({ - init: context.init, - url: url.toString(), - }); - }, -}; -export function createConfig(basePath?: string) { - const middleware: Middleware[] = []; - if (MICROBLOCKS_ENABLED) middleware.push(unanchoredMiddleware); - return new Configuration({ - basePath, - fetchApi, - middleware, - }); -} diff --git a/src/common/api/useApi.ts b/src/common/api/useApi.ts index 66156f453..80ea2ba60 100644 --- a/src/common/api/useApi.ts +++ b/src/common/api/useApi.ts @@ -1,15 +1,17 @@ 'use client'; -import { Configuration as TokenMetadataApiConfiguration } from '@hirosystems/token-metadata-api-client'; +import { + Configuration as TokenMetadataApiConfiguration, + TokensApi, +} from '@hirosystems/token-metadata-api-client'; import { useGlobalContext } from '../context/useGlobalContext'; -import { apiClients, createConfig } from './client'; -export const useApi = () => { +export const useMetadataApi = () => { const basePath = useGlobalContext().activeNetworkKey; - const apiConfig = createConfig(basePath); - const tokenMetadataApiConfig = new TokenMetadataApiConfiguration({ - basePath, - }); - return apiClients(apiConfig, tokenMetadataApiConfig); + return new TokensApi( + new TokenMetadataApiConfiguration({ + basePath, + }) + ); }; diff --git a/src/common/api/utils.ts b/src/common/api/utils.ts deleted file mode 100644 index 36dd6772b..000000000 --- a/src/common/api/utils.ts +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import { ChainID } from '@stacks/transactions'; - -import { NetworkModes } from '../types/network'; - -export const getNetworkModeFromNetworkId = (networkId: ChainID) => { - switch (networkId) { - case ChainID.Mainnet: - return NetworkModes.Mainnet; - case ChainID.Testnet: - return NetworkModes.Testnet; - default: - return undefined; - } -}; diff --git a/src/common/components/FilterMenu.tsx b/src/common/components/FilterMenu.tsx index 69cd8fa9e..ac47ba41d 100644 --- a/src/common/components/FilterMenu.tsx +++ b/src/common/components/FilterMenu.tsx @@ -13,11 +13,11 @@ import { MenuList } from '../../ui/MenuList'; interface MenuItem { onClick: () => void; - label: string; + label: string | undefined; } interface FilterMenuProps { - filterLabel: string | (() => string); + filterLabel: string | (() => string | undefined); menuItems: MenuItem[] | ReactNode[]; leftIcon?: IconType; } diff --git a/src/common/constants/env.ts b/src/common/constants/env.ts index a98674ec6..bf15a58e4 100644 --- a/src/common/constants/env.ts +++ b/src/common/constants/env.ts @@ -32,7 +32,7 @@ export const NODE_ENV = process.env.NODE_ENV || ''; export const RELEASE_TAG_NAME = process.env.NEXT_PUBLIC_RELEASE_TAG_NAME ?? ''; export const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN || ''; -export const HIRO_HEADERS: HeadersInit = { +export const HIRO_HEADERS = { 'x-hiro-product': 'explorer', 'x-hiro-version': RELEASE_TAG_NAME || packageJson.version, }; diff --git a/src/common/queries/useAccountBalance.ts b/src/common/queries/useAccountBalance.ts index cacf2f5f6..b71c71e98 100644 --- a/src/common/queries/useAccountBalance.ts +++ b/src/common/queries/useAccountBalance.ts @@ -1,56 +1,45 @@ -import { - UseQueryOptions, - UseSuspenseQueryOptions, - useQuery, - useSuspenseQuery, -} from '@tanstack/react-query'; +import { useQuery, useSuspenseQuery } from '@tanstack/react-query'; -import { AddressBalanceResponse } from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { ONE_MINUTE } from './query-stale-time'; const ACCOUNT_BALANCE_QUERY_KEY = 'accountBalance'; -export function useAccountBalance( - address?: string, - options: Omit, 'queryKey' | 'queryFn'> = {} -) { - const api = useApi(); +export function useAccountBalance(address?: string) { + const apiClient = useApiClient(); return useQuery({ queryKey: [ACCOUNT_BALANCE_QUERY_KEY, address], - queryFn: () => { + queryFn: async () => { if (!address) return undefined; - const response = api.accountsApi.getAccountBalance({ - principal: address, + const { data, error } = await apiClient.GET('/extended/v1/address/{principal}/balances', { + params: { path: { principal: address } }, }); - return response; + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: ONE_MINUTE, enabled: !!address, - ...options, }); } -export function useSuspenseAccountBalance( - address?: string, - options: Omit< - UseSuspenseQueryOptions, - 'queryKey' | 'queryFn' - > = {} -) { - const api = useApi(); +export function useSuspenseAccountBalance(address?: string) { + const apiClient = useApiClient(); if (!address) throw new Error('Address is required'); return useSuspenseQuery({ queryKey: [ACCOUNT_BALANCE_QUERY_KEY, address], - queryFn: () => { - const response = api.accountsApi.getAccountBalance({ - principal: address, + queryFn: async () => { + const { data, error } = await apiClient.GET('/extended/v1/address/{principal}/balances', { + params: { path: { principal: address } }, }); - - return response; + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: ONE_MINUTE, - ...options, + refetchOnWindowFocus: true, }); } diff --git a/src/common/queries/useAccountStxBalance.ts b/src/common/queries/useAccountStxBalance.ts index d222f17a3..da75cbd6c 100644 --- a/src/common/queries/useAccountStxBalance.ts +++ b/src/common/queries/useAccountStxBalance.ts @@ -1,16 +1,22 @@ import { useQuery } from '@tanstack/react-query'; -import { AddressStxBalanceResponse } from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { THREE_MINUTES } from './query-stale-time'; export function useAccountStxBalance(principal: string) { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['stx-balance', principal], - queryFn: () => - api.accountsApi.getAccountStxBalance({ principal }) as Promise, + queryFn: async () => { + const { data, error } = await apiClient.GET('/extended/v1/address/{principal}/stx', { + params: { path: { principal } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: THREE_MINUTES, }); } diff --git a/src/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts b/src/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts index ebd53b56c..77fe548ae 100644 --- a/src/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts +++ b/src/common/queries/useAddressConfirmedTxsWithTransfersInfinite.ts @@ -12,7 +12,8 @@ import { AddressTransactionWithTransfers, } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -22,22 +23,32 @@ const ADDRESS_CONFIRMED_TXS_WITH_TRANSFERS_INFINITE_QUERY_KEY = 'addressConfirmedTxsWithTransfersInfinite'; export function useAddressConfirmedTxsWithTransfersInfinite( - address?: string, + principal?: string, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ - queryKey: [ADDRESS_CONFIRMED_TXS_WITH_TRANSFERS_INFINITE_QUERY_KEY, address], - queryFn: ({ pageParam }: { pageParam: number }) => - api.accountsApi.getAccountTransactionsWithTransfers({ - principal: address!, - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - }), + queryKey: [ADDRESS_CONFIRMED_TXS_WITH_TRANSFERS_INFINITE_QUERY_KEY, principal], + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!principal) return undefined; + const { data, error } = await apiClient.GET( + '/extended/v1/address/{principal}/transactions_with_transfers', + { + params: { + path: { principal }, + query: { limit: DEFAULT_LIST_LIMIT, offset: pageParam || 0 }, + }, + } + ); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, - enabled: !!address, + enabled: !!principal, ...options, }); } @@ -47,16 +58,25 @@ export function useAddressTransactionEventsInfinite( txId?: string, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: [ADDRESS_CONFIRMED_TXS_WITH_TRANSFERS_INFINITE_QUERY_KEY, address, txId], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getAddressTransactionEvents({ - address: address!, - txId: txId!, - limit: 5, - offset: pageParam || 0, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!address || !txId) return undefined; + const { data, error } = await apiClient.GET( + '/extended/v2/addresses/{address}/transactions/{tx_id}/events', + { + params: { + path: { address, tx_id: txId }, + query: { limit: DEFAULT_LIST_LIMIT, offset: pageParam || 0 }, + }, + } + ); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, @@ -69,29 +89,19 @@ export function useSuspenseAddressTransactionInfinite( address?: string, options: any = {} ): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); if (!address) throw new Error('Address is required'); return useSuspenseInfiniteQuery({ queryKey: [ADDRESS_CONFIRMED_TXS_WITH_TRANSFERS_INFINITE_QUERY_KEY, address], - queryFn: ({ pageParam }: { pageParam: number }) => { - const response = api.transactionsApi - .getAddressTransactions({ - address: address, - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - }) - .catch(error => { - if (error.status === 404) { - return { - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - total: 0, - results: [], - } as GenericResponseType; - } - throw new Error('Failed to fetch transactions.'); - }); - return response; + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!address) return undefined; + const { data, error } = await apiClient.GET('/extended/v2/addresses/{address}/transactions', { + params: { path: { address }, query: { limit: DEFAULT_LIST_LIMIT, offset: pageParam || 0 } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, getNextPageParam, initialPageParam: 0, diff --git a/src/common/queries/useAddressMempoolTxsInfinite.ts b/src/common/queries/useAddressMempoolTxsInfinite.ts index 4f922710b..1033adddf 100644 --- a/src/common/queries/useAddressMempoolTxsInfinite.ts +++ b/src/common/queries/useAddressMempoolTxsInfinite.ts @@ -8,7 +8,8 @@ import { import { MempoolTransaction } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -20,15 +21,19 @@ export function useAddressMempoolTxsInfinite( address?: string, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: [ADDRESS_MEMPOOL_TXS_INFINITE_QUERY_KEY, address], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getMempoolTransactionList({ - address, - limit: DEFAULT_LIST_LIMIT, - offset: pageParam, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!address) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/mempool', { + params: { query: { address, limit: DEFAULT_LIST_LIMIT, offset: pageParam } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, @@ -40,15 +45,19 @@ export function useSuspenseAddressMempoolTxsInfinite( address?: string, options: any = {} ): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseInfiniteQuery({ queryKey: [ADDRESS_MEMPOOL_TXS_INFINITE_QUERY_KEY, address], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getMempoolTransactionList({ - address, - limit: DEFAULT_LIST_LIMIT, - offset: pageParam, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!address) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/mempool', { + params: { query: { address, limit: DEFAULT_LIST_LIMIT, offset: pageParam } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, diff --git a/src/common/queries/useAddressNonces.ts b/src/common/queries/useAddressNonces.ts index ce2809468..10a3e9474 100644 --- a/src/common/queries/useAddressNonces.ts +++ b/src/common/queries/useAddressNonces.ts @@ -1,14 +1,21 @@ import { useQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; export const useAddressNonces = ({ address }: { address: string }) => { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['addressNonces', address], - queryFn: () => - api.accountsApi.getAccountNonces({ - principal: address, - }), + queryFn: async () => { + if (!address) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/address/{principal}/nonces', { + params: { path: { principal: address } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, }); }; diff --git a/src/common/queries/useBlockByHash.ts b/src/common/queries/useBlockByHash.ts index b65747d5f..ae2d18a60 100644 --- a/src/common/queries/useBlockByHash.ts +++ b/src/common/queries/useBlockByHash.ts @@ -2,8 +2,8 @@ import { UseSuspenseQueryOptions, useQuery, useSuspenseQuery } from '@tanstack/r import { Block } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; -import { useGlobalContext } from '../context/useGlobalContext'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; const BLOCK_QUERY_KEY = 'block'; @@ -11,38 +11,41 @@ export function useBlockByHash( hash?: string, options: Partial, 'queryKey'>> = {} ) { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['blockByHash', hash], - queryFn: () => - api.blocksApi.getBlockByHash({ - hash: hash!, - }), + queryFn: async () => { + if (!hash) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/block/{hash}', { + params: { path: { hash } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: Infinity, enabled: !!hash, ...options, }); } -// TODO: Use this until we update @stacks/stacks-blockchain-client -interface BlockWithTenureHeight extends Block { - tenure_height: number | null; - tx_count: number; -} - -export function useSuspenseBlockByHeightOrHash( - heightOrHash: string, - options: Partial< - Omit, 'queryKey'> - > = {} -) { - const { url: activeNetworkUrl } = useGlobalContext().activeNetwork; +export function useSuspenseBlockByHeightOrHash(heightOrHash: string) { + const apiClient = useApiClient(); if (!heightOrHash) throw new Error('Height or hash is required'); return useSuspenseQuery({ queryKey: [BLOCK_QUERY_KEY, heightOrHash], - queryFn: () => - fetch(`${activeNetworkUrl}/extended/v2/blocks/${heightOrHash}`).then(res => res.json()), + queryFn: async () => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v2/blocks/{height_or_hash}', { + params: { path: { height_or_hash: heightOrHash } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: Infinity, - ...options, + refetchOnWindowFocus: true, }); } diff --git a/src/common/queries/useBlockByHeight.ts b/src/common/queries/useBlockByHeight.ts deleted file mode 100644 index 552e245c3..000000000 --- a/src/common/queries/useBlockByHeight.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { UseQueryResult, useQuery } from '@tanstack/react-query'; - -import { Block } from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; -import { ONE_MINUTE } from './query-stale-time'; - -export function useBlockByHeight(height: number, options: any = {}): UseQueryResult { - const api = useApi(); - return useQuery({ - queryKey: ['block-by-height', height], - queryFn: () => api.blocksApi.getBlockByHeight({ height }), - staleTime: ONE_MINUTE, - ...options, - }); -} diff --git a/src/common/queries/useBlockListInfinite.ts b/src/common/queries/useBlockListInfinite.ts index bba33cdaf..0f55ff5a2 100644 --- a/src/common/queries/useBlockListInfinite.ts +++ b/src/common/queries/useBlockListInfinite.ts @@ -1,66 +1,26 @@ -import { useInfiniteQuery, useSuspenseInfiniteQuery } from '@tanstack/react-query'; +import { useSuspenseInfiniteQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { getNextPageParam } from '../utils/utils'; import { TWO_MINUTES } from './query-stale-time'; export const BLOCK_LIST_QUERY_KEY = 'blockListInfinite'; -export const useBlockListInfinite = () => { - const api = useApi(); - return useInfiniteQuery({ - queryKey: [BLOCK_LIST_QUERY_KEY], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlockList({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - }), - staleTime: TWO_MINUTES, - getNextPageParam, - initialPageParam: 0, - }); -}; - export const useSuspenseBlockListInfinite = (limit = DEFAULT_LIST_LIMIT) => { - const api = useApi(); - return useSuspenseInfiniteQuery({ - queryKey: [BLOCK_LIST_QUERY_KEY, limit], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlockList({ - limit, - offset: pageParam || 0, - }), - staleTime: TWO_MINUTES, - getNextPageParam, - initialPageParam: 0, - }); -}; - -export const useBlocksInfiniteNew = () => { - const api = useApi(); - return useInfiniteQuery({ - queryKey: [BLOCK_LIST_QUERY_KEY], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlocks({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - }), - staleTime: TWO_MINUTES, - getNextPageParam, - initialPageParam: 0, - }); -}; - -export const useSuspenseBlocksInfiniteNew = (limit = DEFAULT_LIST_LIMIT) => { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseInfiniteQuery({ queryKey: [BLOCK_LIST_QUERY_KEY, limit], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlocks({ - limit, - offset: pageParam || 0, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + const { data, error } = await apiClient.GET('/extended/v2/blocks/', { + params: { query: { limit, offset: pageParam || 0 } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: TWO_MINUTES, getNextPageParam, initialPageParam: 0, diff --git a/src/common/queries/useBlockTxsInfinite.ts b/src/common/queries/useBlockTxsInfinite.ts index 7bed18bd0..773784227 100644 --- a/src/common/queries/useBlockTxsInfinite.ts +++ b/src/common/queries/useBlockTxsInfinite.ts @@ -1,15 +1,15 @@ import { + InfiniteData, UseInfiniteQueryResult, - UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, useInfiniteQuery, useSuspenseInfiniteQuery, } from '@tanstack/react-query'; -import { InfiniteData } from '@tanstack/react-query'; import { Transaction } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { MAX_BLOCK_TRANSACTIONS_PER_CALL } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -19,15 +19,22 @@ export function useBlockTxsInfinite( blockHash?: string, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: ['blockTxsInfinite', blockHash], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getTransactionsByBlockHash({ - blockHash: blockHash!, - limit: MAX_BLOCK_TRANSACTIONS_PER_CALL, - offset: pageParam || 0, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!blockHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/block/{block_hash}', { + params: { + path: { block_hash: blockHash }, + query: { limit: MAX_BLOCK_TRANSACTIONS_PER_CALL, offset: pageParam || 0 }, + }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, @@ -40,15 +47,22 @@ export function useSuspenseBlockTxsInfinite( blockHash: string, options: any = {} ): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseInfiniteQuery({ queryKey: ['blockTxsInfinite', blockHash], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getTransactionsByBlockHash({ - blockHash, - limit: MAX_BLOCK_TRANSACTIONS_PER_CALL, - offset: pageParam || 0, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!blockHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/block/{block_hash}', { + params: { + path: { block_hash: blockHash }, + query: { limit: MAX_BLOCK_TRANSACTIONS_PER_CALL, offset: pageParam || 0 }, + }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, diff --git a/src/common/queries/useBlocksByBurnBlock.ts b/src/common/queries/useBlocksByBurnBlock.ts index 9c6f45329..42380a3d1 100644 --- a/src/common/queries/useBlocksByBurnBlock.ts +++ b/src/common/queries/useBlocksByBurnBlock.ts @@ -6,9 +6,10 @@ import { useSuspenseInfiniteQuery, } from '@tanstack/react-query'; -import { NakamotoBlock } from '@stacks/blockchain-api-client/src/generated/models'; +import { NakamotoBlock } from '@stacks/blockchain-api-client'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; import { ONE_SECOND, TWO_MINUTES } from './query-stale-time'; @@ -18,18 +19,29 @@ export const GET_BLOCKS_BY_BURN_BLOCK_QUERY_KEY = 'getBlocksByBurnBlock'; export const MAX_STX_BLOCKS_PER_BURN_BLOCK_LIMIT = 30; export function useGetStxBlocksByBurnBlockQuery() { - const api = useApi(); + const apiClient = useApiClient(); return ( heightOrHash: string | number, - numStxBlocksperBtcBlock: number = MAX_STX_BLOCKS_PER_BURN_BLOCK_LIMIT + numStxBlocksPerBtcBlock: number = MAX_STX_BLOCKS_PER_BURN_BLOCK_LIMIT ) => ({ queryKey: [GET_BLOCKS_BY_BURN_BLOCK_QUERY_KEY, heightOrHash, 'special'], - queryFn: () => - api.blocksApi.getBlocksByBurnBlock({ - heightOrHash, - limit: numStxBlocksperBtcBlock, - }), + queryFn: async () => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET( + '/extended/v2/burn-blocks/{height_or_hash}/blocks', + { + params: { + path: { height_or_hash: heightOrHash }, + query: { limit: numStxBlocksPerBtcBlock }, + }, + } + ); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: TWO_MINUTES, cacheTime: 15 * 60 * 1000, refetchOnWindowFocus: false, @@ -43,16 +55,23 @@ export function useBlocksByBurnBlock( options?: object, queryKeyExtension?: string ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); const rangeQueryKey = offset ? `${offset}-${offset + limit}` : ''; return useInfiniteQuery({ queryKey: [GET_BLOCKS_BY_BURN_BLOCK_QUERY_KEY, heightOrHash, rangeQueryKey, queryKeyExtension], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlocksByBurnBlock({ - heightOrHash, - limit, - offset: pageParam, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET( + '/extended/v2/burn-blocks/{height_or_hash}/blocks', + { + params: { path: { height_or_hash: heightOrHash }, query: { limit, offset: pageParam } }, + } + ); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: offset ?? 0, staleTime: heightOrHash === 'latest' ? ONE_SECOND * 5 : TWO_MINUTES, @@ -66,15 +85,22 @@ export function useSuspenseBlocksByBurnBlock( options: any = {}, queryKeyExtension?: string ): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseInfiniteQuery({ queryKey: [GET_BLOCKS_BY_BURN_BLOCK_QUERY_KEY, heightOrHash, queryKeyExtension], - queryFn: ({ pageParam }: { pageParam: number }) => - api.blocksApi.getBlocksByBurnBlock({ - heightOrHash, - limit, - offset: pageParam, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET( + '/extended/v2/burn-blocks/{height_or_hash}/blocks', + { + params: { path: { height_or_hash: heightOrHash }, query: { limit, offset: pageParam } }, + } + ); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: options.offset ?? 0, staleTime: heightOrHash === 'latest' ? ONE_SECOND * 5 : TWO_MINUTES, diff --git a/src/common/queries/useBurnBlock.ts b/src/common/queries/useBurnBlock.ts index ed333249d..b9f55cc06 100644 --- a/src/common/queries/useBurnBlock.ts +++ b/src/common/queries/useBurnBlock.ts @@ -8,14 +8,15 @@ import { import { BurnBlock } from '@stacks/blockchain-api-client'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; export const BURN_BLOCKS_QUERY_KEY = 'burnBlocks'; export function useFetchBurnBlock(): ( heightOrHash: string | number ) => Promise { - const api = useApi(); + const apiClient = useApiClient(); const queryClient = useQueryClient(); return async (heightOrHash: string | number) => { @@ -27,8 +28,15 @@ export function useFetchBurnBlock(): ( } // Fetch the data and update the cache - const fetchBurnBlock = async (): Promise => { - return api.burnBlocksApi.getBurnBlock({ heightOrHash }).catch(() => undefined); + const fetchBurnBlock = async () => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v2/burn-blocks/{height_or_hash}', { + params: { path: { height_or_hash: heightOrHash } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }; return queryClient.fetchQuery({ @@ -53,31 +61,23 @@ export function useFetchMultipleBurnBlocks(): ( }; } -export function useGetBurnBlockQuery() { - const api = useApi(); - return (heightOrHash: string | number) => ({ - queryKey: [BURN_BLOCKS_QUERY_KEY, heightOrHash], - queryFn: () => - api.burnBlocksApi.getBurnBlock({ - heightOrHash, - }), - cacheTime: 15 * 60 * 1000, - }); -} - export function useBurnBlock( heightOrHash: number | string, options: any = {} ): UseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['burn-block', heightOrHash], - queryFn: () => - api.burnBlocksApi - .getBurnBlock({ - heightOrHash, - }) - .catch(() => undefined), + queryFn: async () => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v2/burn-blocks/{height_or_hash}', { + params: { path: { height_or_hash: heightOrHash } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: Infinity, ...options, }); @@ -87,10 +87,19 @@ export function useSuspenseBurnBlock( heightOrHash: number | string, options: any = {} ): UseSuspenseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseQuery({ queryKey: ['burn-block', heightOrHash], - queryFn: () => api.burnBlocksApi.getBurnBlock({ heightOrHash }).catch(() => undefined), + queryFn: async () => { + if (!heightOrHash) return undefined; + const { data, error } = await apiClient.GET('/extended/v2/burn-blocks/{height_or_hash}', { + params: { path: { height_or_hash: heightOrHash } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: Infinity, ...options, }); diff --git a/src/common/queries/useBurnBlocksInfinite.ts b/src/common/queries/useBurnBlocksInfinite.ts index 98aa60258..ef2b4348d 100644 --- a/src/common/queries/useBurnBlocksInfinite.ts +++ b/src/common/queries/useBurnBlocksInfinite.ts @@ -1,14 +1,13 @@ import { InfiniteData, - UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult, - useInfiniteQuery, useSuspenseInfiniteQuery, } from '@tanstack/react-query'; import { BurnBlock } from '@stacks/blockchain-api-client'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_BURN_BLOCKS_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -16,40 +15,24 @@ import { TWO_MINUTES } from './query-stale-time'; export const BURN_BLOCKS_QUERY_KEY = 'burnBlocks'; -// TODO: move code into useBurnBlocks -export function useBurnBlocks( - options: any = {} -): UseInfiniteQueryResult>> { - const api = useApi(); - return useInfiniteQuery({ - queryKey: [BURN_BLOCKS_QUERY_KEY], - queryFn: ({ pageParam }: { pageParam: number }) => - api.burnBlocksApi.getBurnBlocks({ - limit: DEFAULT_BURN_BLOCKS_LIMIT, - offset: pageParam, - }), - getNextPageParam, - initialPageParam: 0, - staleTime: TWO_MINUTES, - ...options, - }); -} - export function useSuspenseBurnBlocks( limit = DEFAULT_BURN_BLOCKS_LIMIT, options: any = {}, queryKeyExtension?: string ): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseInfiniteQuery({ queryKey: queryKeyExtension ? [BURN_BLOCKS_QUERY_KEY, limit, queryKeyExtension] : [BURN_BLOCKS_QUERY_KEY, limit], - queryFn: ({ pageParam }: { pageParam: number }) => { - return api.burnBlocksApi.getBurnBlocks({ - limit, - offset: pageParam, + queryFn: async ({ pageParam }: { pageParam: number }) => { + const { data, error } = await apiClient.GET('/extended/v2/burn-blocks/', { + params: { query: { limit, offset: pageParam } }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, getNextPageParam, initialPageParam: 0, diff --git a/src/common/queries/useConfirmedTransactionsInfinite.ts b/src/common/queries/useConfirmedTransactionsInfinite.ts index d5c8d8a42..89b73a252 100644 --- a/src/common/queries/useConfirmedTransactionsInfinite.ts +++ b/src/common/queries/useConfirmedTransactionsInfinite.ts @@ -1,20 +1,9 @@ -import { - UseInfiniteQueryResult, - UseQueryOptions, - UseSuspenseInfiniteQueryResult, - UseSuspenseQueryOptions, - useInfiniteQuery, - useSuspenseInfiniteQuery, -} from '@tanstack/react-query'; -import { InfiniteData } from '@tanstack/react-query'; +import { InfiniteData, UseInfiniteQueryResult, useInfiniteQuery } from '@tanstack/react-query'; -import { - GetTransactionListOrderEnum, - GetTransactionListSortByEnum, -} from '@stacks/blockchain-api-client'; -import { Block, Transaction } from '@stacks/stacks-blockchain-api-types'; +import { Transaction } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -34,12 +23,12 @@ export function useConfirmedTransactionsInfinite( toAddress?: string; startTime?: number; endTime?: number; - order?: GetTransactionListOrderEnum; - sortBy?: GetTransactionListSortByEnum; + order?: 'asc' | 'desc' | undefined; + sortBy?: string; } = {}, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: [ 'confirmedTransactionsInfinite', @@ -52,21 +41,31 @@ export function useConfirmedTransactionsInfinite( ], queryFn: async ({ pageParam }: { pageParam: number }) => { if (fromAddress?.endsWith('.btc')) { - fromAddress = (await searchByBnsName(api, fromAddress))?.result.entity_id || fromAddress; + fromAddress = + (await searchByBnsName(apiClient, fromAddress))?.result.entity_id || fromAddress; } if (toAddress?.endsWith('.btc')) { - toAddress = (await searchByBnsName(api, toAddress))?.result.entity_id || toAddress; + toAddress = (await searchByBnsName(apiClient, toAddress))?.result.entity_id || toAddress; } - return api.transactionsApi.getTransactionList({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam, - fromAddress, - toAddress, - startTime, - endTime, - order, - sortBy, + + const { data, error } = await apiClient.GET('/extended/v1/tx/', { + params: { + query: { + limit: DEFAULT_LIST_LIMIT, + offset: pageParam, + fromAddress, + toAddress, + startTime, + endTime, + order, + sortBy, + }, + }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, initialPageParam: 0, getNextPageParam, @@ -75,21 +74,3 @@ export function useConfirmedTransactionsInfinite( ...options, }); } - -export function useSuspenseConfirmedTransactionsInfinite(): UseSuspenseInfiniteQueryResult< - InfiniteData> -> { - const api = useApi(); - return useSuspenseInfiniteQuery({ - queryKey: ['confirmedTransactionsInfinite'], - queryFn: ({ pageParam }: { pageParam: number }) => - api.transactionsApi.getTransactionList({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam, - }), - initialPageParam: 0, - getNextPageParam, - staleTime: TWO_MINUTES, - refetchOnWindowFocus: true, - }); -} diff --git a/src/common/queries/useContractById.ts b/src/common/queries/useContractById.ts index 33da0d763..50044455b 100644 --- a/src/common/queries/useContractById.ts +++ b/src/common/queries/useContractById.ts @@ -7,20 +7,25 @@ import { useSuspenseQuery, } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { ContractWithParsedAbi } from '../types/contract'; export function useContractById( contractId?: string, options: any = {} ): UseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['contractById', contractId], queryFn: async () => { - const contract = await api.smartContractsApi.getContractById({ - contractId: contractId!, + if (!contractId) return undefined; + const { data: contract, error } = await apiClient.GET('/extended/v1/contract/{contract_id}', { + params: { path: { contract_id: contractId } }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } return { ...contract, abi: contract.abi ? JSON.parse(contract.abi) : undefined, @@ -36,14 +41,18 @@ export function useSuspenseContractById( contractId?: string, options: any = {} ): UseSuspenseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); if (!contractId) throw new Error('Contract ID is required'); return useSuspenseQuery({ queryKey: ['contractById', contractId], queryFn: async () => { - const contract = await api.smartContractsApi.getContractById({ - contractId, + if (!contractId) return undefined; + const { data: contract, error } = await apiClient.GET('/extended/v1/contract/{contract_id}', { + params: { path: { contract_id: contractId } }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } return { ...contract, abi: contract.abi ? JSON.parse(contract.abi) : undefined, diff --git a/src/common/queries/useContractFtMetadata.ts b/src/common/queries/useContractFtMetadata.ts index 80cfe7eb3..0996c7c80 100644 --- a/src/common/queries/useContractFtMetadata.ts +++ b/src/common/queries/useContractFtMetadata.ts @@ -1,12 +1,12 @@ import { useQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { useMetadataApi } from '../api/useApi'; export function useContractFtMetadata(contractId?: string) { - const api = useApi(); + const tokenMetadataApi = useMetadataApi(); return useQuery({ queryKey: ['contract-ft-metadata', contractId], - queryFn: () => api.tokenMetadataApi?.getFtMetadata(contractId!), + queryFn: () => tokenMetadataApi?.getFtMetadata(contractId!), enabled: !!contractId, }); } diff --git a/src/common/queries/useCoreApiInfo.ts b/src/common/queries/useCoreApiInfo.ts index 02d6fba2e..eebf63eed 100644 --- a/src/common/queries/useCoreApiInfo.ts +++ b/src/common/queries/useCoreApiInfo.ts @@ -1,11 +1,11 @@ import { useQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { useGlobalContext } from '../context/useGlobalContext'; export function useCoreApiInfo() { - const api = useApi(); + const { url: activeNetworkUrl } = useGlobalContext().activeNetwork; return useQuery({ queryKey: ['coreApiInfo'], - queryFn: () => api.infoApi.getCoreApiInfo(), + queryFn: () => fetch(`${activeNetworkUrl}/v2/info`).then(res => res.json()), }); } diff --git a/src/common/queries/useCustomNetworkApiInfo.ts b/src/common/queries/useCustomNetworkApiInfo.ts index c141b1ec0..0283d42e0 100644 --- a/src/common/queries/useCustomNetworkApiInfo.ts +++ b/src/common/queries/useCustomNetworkApiInfo.ts @@ -1,20 +1,13 @@ -import { UseQueryOptions, useQuery } from '@tanstack/react-query'; +import { useQuery } from '@tanstack/react-query'; -import { CoreNodeInfoResponse } from '@stacks/blockchain-api-client/src/generated/models'; - -import { useApi } from '../api/useApi'; import { DEFAULT_V2_INFO_ENDPOINT } from '../constants/constants'; import { ONE_MINUTE } from './query-stale-time'; export const getCustomNetworkApiInfo = (baseUrl: string) => () => fetch(`${baseUrl}${DEFAULT_V2_INFO_ENDPOINT}`).then(res => res.json()); -export function useCustomNetworkApiInfo( - url: string, - options: Omit, 'queryKey'> = {} -) { - const api = useApi(); - return useQuery({ +export function useCustomNetworkApiInfo(url: string, options: any = {}) { + return useQuery({ queryKey: ['customNetworkApiInfo', url], queryFn: getCustomNetworkApiInfo(url), staleTime: ONE_MINUTE, diff --git a/src/common/queries/useFaucet.ts b/src/common/queries/useFaucet.ts index 989c7d4d3..5e89bf9e7 100644 --- a/src/common/queries/useFaucet.ts +++ b/src/common/queries/useFaucet.ts @@ -1,11 +1,20 @@ import { useMutation } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; export function useFaucet() { - const api = useApi(); + const apiClient = useApiClient(); return useMutation({ - mutationFn: ({ address, staking }: { address: string; staking?: boolean }) => - api.faucetsApi.runFaucetStx({ address, ...(staking ? { staking: true } : {}) }), + mutationFn: async ({ address, staking }: { address: string; staking?: boolean }) => { + if (!address) return undefined; + const { data, error } = await apiClient.POST('/extended/v1/faucets/stx', { + body: { address, ...(staking ? { staking: true } : {}) }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, }); } diff --git a/src/common/queries/useFeeTransfer.ts b/src/common/queries/useFeeTransfer.ts index 51974342d..2cbf22c82 100644 --- a/src/common/queries/useFeeTransfer.ts +++ b/src/common/queries/useFeeTransfer.ts @@ -1,11 +1,11 @@ +import { useGlobalContext } from '@/common/context/useGlobalContext'; import { useQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; - export function useFeeTransfer() { - const api = useApi(); + const { url: activeNetworkUrl } = useGlobalContext().activeNetwork; + return useQuery({ queryKey: ['transfer-fees'], - queryFn: () => api.feesApi.getFeeTransfer(), + queryFn: () => fetch(`${activeNetworkUrl}/v2/fees/transfer`).then(res => res.json()), }); } diff --git a/src/common/queries/useFtMetadata.ts b/src/common/queries/useFtMetadata.ts index 59681e04f..a57f61049 100644 --- a/src/common/queries/useFtMetadata.ts +++ b/src/common/queries/useFtMetadata.ts @@ -6,16 +6,16 @@ import { useSuspenseQuery, } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { useMetadataApi } from '../api/useApi'; export function useFtMetadata( contractId?: string, options: any = {} ): UseQueryResult { - const api = useApi(); + const tokenMetadataApi = useMetadataApi(); return useQuery({ queryKey: ['ft-metadata', contractId], - queryFn: () => api.tokenMetadataApi?.getFtMetadata(contractId!), + queryFn: () => tokenMetadataApi?.getFtMetadata(contractId!), retry: false, staleTime: Infinity, refetchOnWindowFocus: false, @@ -28,10 +28,10 @@ export function useSuspenseFtMetadata( contractId: string, options: any = {} ): UseSuspenseQueryResult { - const api = useApi(); + const tokenMetadataApi = useMetadataApi(); return useSuspenseQuery({ queryKey: ['ft-metadata', contractId], - queryFn: () => api.tokenMetadataApi?.getFtMetadata(contractId), + queryFn: () => tokenMetadataApi?.getFtMetadata(contractId), retry: false, staleTime: Infinity, refetchOnWindowFocus: false, diff --git a/src/common/queries/useFtTokens.ts b/src/common/queries/useFtTokens.ts index 87994911d..7bdd6dd7d 100644 --- a/src/common/queries/useFtTokens.ts +++ b/src/common/queries/useFtTokens.ts @@ -2,14 +2,14 @@ import { FtBasicMetadataResponse } from '@hirosystems/token-metadata-api-client'; import { + InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult, useInfiniteQuery, useSuspenseInfiniteQuery, } from '@tanstack/react-query'; -import { InfiniteData } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { useMetadataApi } from '../api/useApi'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -31,7 +31,7 @@ export const useFtTokens = ( }, options: any = {} ): UseInfiniteQueryResult>> => { - const { tokenMetadataApi } = useApi(); + const tokenMetadataApi = useMetadataApi(); return useInfiniteQuery({ queryKey: ['ftTokens', name, symbol, address, order_by, order], queryFn: ({ pageParam }: { pageParam: number }) => @@ -67,7 +67,7 @@ export const useSuspenseFtTokens = ( }, options: any = {} ): UseSuspenseInfiniteQueryResult>> => { - const { tokenMetadataApi } = useApi(); + const tokenMetadataApi = useMetadataApi(); return useSuspenseInfiniteQuery({ queryKey: ['ftTokens', name, symbol, address, order_by, order], queryFn: ({ pageParam }: { pageParam: number }) => diff --git a/src/common/queries/useMempoolFee.ts b/src/common/queries/useMempoolFee.ts index bc9aa44a2..537e304a8 100644 --- a/src/common/queries/useMempoolFee.ts +++ b/src/common/queries/useMempoolFee.ts @@ -1,14 +1,19 @@ import { useSuspenseQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { ONE_MINUTE } from './query-stale-time'; export function useSuspenseMempoolFee(options: any = {}) { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseQuery({ queryKey: ['mempoolFee'], - queryFn: () => { - return api.mempoolApi.getMempoolFeePriorities(); + queryFn: async () => { + const { data, error } = await apiClient.GET('/extended/v2/mempool/fees'); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: ONE_MINUTE, ...options, diff --git a/src/common/queries/useMempoolTransactionsInfinite.ts b/src/common/queries/useMempoolTransactionsInfinite.ts index a0e12375f..18af3fac5 100644 --- a/src/common/queries/useMempoolTransactionsInfinite.ts +++ b/src/common/queries/useMempoolTransactionsInfinite.ts @@ -1,62 +1,37 @@ -import { - InfiniteData, - UseInfiniteQueryResult, - UseSuspenseInfiniteQueryResult, - useInfiniteQuery, - useSuspenseInfiniteQuery, -} from '@tanstack/react-query'; +import { InfiniteData, UseInfiniteQueryResult, useInfiniteQuery } from '@tanstack/react-query'; -import { - GetMempoolTransactionListOrderByEnum, - GetMempoolTransactionListOrderEnum, -} from '@stacks/blockchain-api-client'; import { MempoolTransaction } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_LIST_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; import { TWO_MINUTES } from './query-stale-time'; export function useMempoolTransactionsInfinite( - sort: GetMempoolTransactionListOrderByEnum = GetMempoolTransactionListOrderByEnum.age, - order: GetMempoolTransactionListOrderEnum = GetMempoolTransactionListOrderEnum.asc + sort = 'age', + order: 'asc' | 'desc' | undefined = 'asc' ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: ['mempoolTransactionsInfinite', sort, order], - queryFn: ({ pageParam }) => - api.transactionsApi.getMempoolTransactionList({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - order, - orderBy: sort, - }), - getNextPageParam, - initialPageParam: 0, - staleTime: TWO_MINUTES, - refetchOnMount: false, - retry: false, - refetchOnReconnect: false, - refetchInterval: false, - refetchIntervalInBackground: false, - }); -} - -export function useSuspenseMempoolTransactionsInfinite( - sort: GetMempoolTransactionListOrderByEnum = GetMempoolTransactionListOrderByEnum.age, - order: GetMempoolTransactionListOrderEnum = GetMempoolTransactionListOrderEnum.asc -): UseSuspenseInfiniteQueryResult>> { - const api = useApi(); - return useSuspenseInfiniteQuery({ - queryKey: ['mempoolTransactionsInfinite', sort, order], - queryFn: ({ pageParam }) => - api.transactionsApi.getMempoolTransactionList({ - limit: DEFAULT_LIST_LIMIT, - offset: pageParam || 0, - order, - orderBy: sort, - }), + queryFn: async ({ pageParam }: { pageParam: number }) => { + const { data, error } = await apiClient.GET('/extended/v1/tx/mempool', { + params: { + query: { + limit: DEFAULT_LIST_LIMIT, + offset: pageParam || 0, + order, + orderBy: sort, + }, + }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, getNextPageParam, initialPageParam: 0, staleTime: TWO_MINUTES, diff --git a/src/common/queries/useMempoolTxStats.ts b/src/common/queries/useMempoolTxStats.ts index 2dbf68c62..1a277a8da 100644 --- a/src/common/queries/useMempoolTxStats.ts +++ b/src/common/queries/useMempoolTxStats.ts @@ -1,30 +1,22 @@ -import { useQuery, useSuspenseQuery } from '@tanstack/react-query'; +import { useSuspenseQuery } from '@tanstack/react-query'; -import { MempoolTransactionStatsResponse } from '@stacks/blockchain-api-client'; +import { OperationResponse } from '@stacks/blockchain-api-client'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { ONE_MINUTE } from './query-stale-time'; -export function useMempoolTransactionStats(options: any = {}) { - const api = useApi(); - return useQuery({ +export function useSuspenseMempoolTransactionStats() { + const apiClient = useApiClient(); + return useSuspenseQuery({ queryKey: ['mempoolTransactionStats'], - queryFn: () => { - return api.transactionsApi.getMempoolTransactionStats(); + queryFn: async () => { + const { data, error } = await apiClient.GET('/extended/v1/tx/mempool/stats'); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: ONE_MINUTE, - ...options, - }); -} - -export function useSuspenseMempoolTransactionStats(options: any = {}) { - const api = useApi(); - return useSuspenseQuery({ - queryKey: ['mempoolTransactionStats'], - queryFn: () => { - return api.transactionsApi.getMempoolTransactionStats(); - }, - staleTime: ONE_MINUTE, - ...options, }); } diff --git a/src/common/queries/useMicroblockByHash.ts b/src/common/queries/useMicroblockByHash.ts deleted file mode 100644 index 747086359..000000000 --- a/src/common/queries/useMicroblockByHash.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { UseSuspenseQueryResult, useSuspenseQuery } from '@tanstack/react-query'; - -import { Microblock } from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; - -export function useSuspenseMicroblockByHash( - microblockHash: string, - options: any = {} -): UseSuspenseQueryResult { - const api = useApi(); - return useSuspenseQuery({ - queryKey: ['microblockByHash', microblockHash], - queryFn: () => - api.microblocksApi.getMicroblockByHash({ - hash: microblockHash, - }), - staleTime: Infinity, - ...options, - }); -} diff --git a/src/common/queries/useNftHistory.ts b/src/common/queries/useNftHistory.ts deleted file mode 100644 index 7f0081c62..000000000 --- a/src/common/queries/useNftHistory.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { UseQueryResult, useQuery } from '@tanstack/react-query'; - -import { - NonFungibleTokenHistoryEventList, - NonFungibleTokenHistoryEventWithTxMetadata, -} from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; - -interface NonFungibleTokenHistoryEventListExtended extends NonFungibleTokenHistoryEventList { - results: Array; -} - -export function useNftHistory( - assetIdentifier: string, - value: string, - options: any = {} -): UseQueryResult { - const api = useApi(); - return useQuery({ - queryKey: ['nft-history', assetIdentifier, value], - queryFn: () => - api.nonFungibleTokensApi.getNftHistory({ - assetIdentifier, - value, - }), - ...options, - }); -} diff --git a/src/common/queries/useNftHoldings.ts b/src/common/queries/useNftHoldings.ts index a07d180aa..7a516d457 100644 --- a/src/common/queries/useNftHoldings.ts +++ b/src/common/queries/useNftHoldings.ts @@ -1,47 +1,29 @@ -import { - UseQueryResult, - UseSuspenseQueryResult, - useQuery, - useSuspenseQuery, -} from '@tanstack/react-query'; +import { UseSuspenseQueryResult, useSuspenseQuery } from '@tanstack/react-query'; import { NonFungibleTokenHoldingsList } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { ONE_MINUTE } from './query-stale-time'; -export const useNftHoldings = ( - address?: string, - options: any = {} -): UseQueryResult => { - const api = useApi(); - if (!address) throw new Error('Address is required'); - return useQuery({ - queryKey: ['nftHoldings', address], - queryFn: () => - api.nonFungibleTokensApi.getNftHoldings({ - principal: address!, - limit: 200, - }), - enabled: !!address, - staleTime: ONE_MINUTE, - ...options, - }); -}; - export const useSuspenseNftHoldings = ( address?: string, options: any = {} ): UseSuspenseQueryResult => { - const api = useApi(); + const apiClient = useApiClient(); if (!address) throw new Error('Address is required'); return useSuspenseQuery({ queryKey: ['nftHoldings', address], - queryFn: () => - api.nonFungibleTokensApi.getNftHoldings({ - principal: address, - limit: 200, - }), + queryFn: async () => { + if (!address) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tokens/nft/holdings', { + params: { query: { principal: address, limit: 200, tx_metadata: false } }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; + }, staleTime: ONE_MINUTE, ...options, }); diff --git a/src/common/queries/useNftMetadata.ts b/src/common/queries/useNftMetadata.ts index e6060522c..6e4832d26 100644 --- a/src/common/queries/useNftMetadata.ts +++ b/src/common/queries/useNftMetadata.ts @@ -1,16 +1,16 @@ import { NftMetadataResponse } from '@hirosystems/token-metadata-api-client'; -import { UseQueryOptions, useQuery, useSuspenseQuery } from '@tanstack/react-query'; +import { UseQueryOptions, useQuery } from '@tanstack/react-query'; -import { useApi } from '../api/useApi'; +import { useMetadataApi } from '../api/useApi'; export const useNftMetadata = ( { contractId, tokenId }: { contractId?: string; tokenId?: number }, options: Omit, 'queryKey' | 'queryFn'> = {} ) => { - const api = useApi(); + const tokenMetadataApi = useMetadataApi(); return useQuery({ queryKey: ['nft-metadata', contractId, tokenId], - queryFn: () => api.tokenMetadataApi?.getNftMetadata(contractId!, tokenId!), + queryFn: () => tokenMetadataApi?.getNftMetadata(contractId!, tokenId!), retry: false, staleTime: Infinity, refetchOnWindowFocus: false, @@ -18,18 +18,3 @@ export const useNftMetadata = ( ...options, }); }; - -export const useSuspenseNftMetadata = ( - { contractId, tokenId }: { contractId: string; tokenId: number }, - options: Omit, 'queryKey' | 'queryFn'> = {} -) => { - const api = useApi(); - return useSuspenseQuery({ - queryKey: ['nft-metadata', contractId, tokenId], - queryFn: () => api.tokenMetadataApi?.getNftMetadata(contractId, tokenId), - retry: false, - staleTime: Infinity, - refetchOnWindowFocus: false, - ...options, - }); -}; diff --git a/src/common/queries/usePoxInfo.ts b/src/common/queries/usePoxInfo.ts index c09063637..8ef995370 100644 --- a/src/common/queries/usePoxInfo.ts +++ b/src/common/queries/usePoxInfo.ts @@ -2,7 +2,7 @@ import { UseSuspenseQueryOptions, useSuspenseQuery } from '@tanstack/react-query import { CoreNodePoxResponse } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { useGlobalContext } from '../context/useGlobalContext'; import { ONE_MINUTE } from './query-stale-time'; export const useSuspensePoxInfo = ( @@ -10,10 +10,10 @@ export const useSuspensePoxInfo = ( Omit, 'queryKey'> > = {} ) => { - const api = useApi(); + const { url: activeNetworkUrl } = useGlobalContext().activeNetwork; return useSuspenseQuery({ queryKey: ['poxInfo'], - queryFn: () => api.infoApi.getPoxInfo(), + queryFn: () => fetch(`${activeNetworkUrl}/v2/pox`).then(res => res.json()), staleTime: ONE_MINUTE, ...options, }); diff --git a/src/common/queries/usePoxInforRaw.ts b/src/common/queries/usePoxInforRaw.ts index 7007239a4..8ac974a49 100644 --- a/src/common/queries/usePoxInforRaw.ts +++ b/src/common/queries/usePoxInforRaw.ts @@ -2,8 +2,6 @@ import { useSuspenseQuery } from '@tanstack/react-query'; import { useGlobalContext } from '../context/useGlobalContext'; -// import { } from '@stacks/stacks-blockchain-api-types'; // TODO: ask for PoxInfo type - interface PoxInfo { contract_id: string; pox_activation_threshold_ustx: number; diff --git a/src/common/queries/useSearchById.ts b/src/common/queries/useSearchById.ts deleted file mode 100644 index 1a686987b..000000000 --- a/src/common/queries/useSearchById.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { UseQueryResult, useQuery } from '@tanstack/react-query'; - -import { SearchSuccessResult } from '@stacks/stacks-blockchain-api-types'; - -import { useApi } from '../api/useApi'; -import { ONE_MINUTE } from './query-stale-time'; - -export function useSearchById(id: string, options: any = {}): UseQueryResult { - const api = useApi(); - return useQuery({ - queryKey: ['search-by-id', id], - queryFn: async () => { - try { - return api.searchApi.searchById({ id, includeMetadata: true }); - } catch (e: any) { - try { - const data = await e.json(); - if (data && 'found' in data) { - throw data; - } - } catch (e) { - throw e; - } - } - }, - staleTime: ONE_MINUTE, - ...options, - }); -} diff --git a/src/common/queries/useSearchQuery.ts b/src/common/queries/useSearchQuery.ts index ef9fee2d7..c24fd025c 100644 --- a/src/common/queries/useSearchQuery.ts +++ b/src/common/queries/useSearchQuery.ts @@ -1,17 +1,13 @@ import { UTCDate } from '@date-fns/utc'; import { useQuery } from '@tanstack/react-query'; -import { - GetTransactionListOrderEnum, - GetTransactionListSortByEnum, -} from '@stacks/blockchain-api-client'; import { Block, Transaction } from '@stacks/stacks-blockchain-api-types'; import { bufferCVFromString, cvToHex, tupleCV } from '@stacks/transactions'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { blur, focus } from '../../features/search/search-slice'; -import { useApi } from '../api/useApi'; import { BTC_BNS_CONTRACT } from '../constants/constants'; -import { useGlobalContext } from '../context/useGlobalContext'; import { useAppDispatch } from '../state/hooks'; import { Network } from '../types/network'; import { @@ -49,18 +45,24 @@ function nftHistoryToSearchResult(nftHistoryEntry: any, bnsName: string): FoundR }; } -export async function searchByBnsName(api: ReturnType, bnsName: string) { +export async function searchByBnsName(apiClient: ReturnType, bnsName: string) { try { - const nftHistory = await api.nonFungibleTokensApi.getNftHistory({ - assetIdentifier: BTC_BNS_CONTRACT, - value: cvToHex( - tupleCV({ - ['name']: bufferCVFromString(bnsName.replace(new RegExp('.btc$'), '')), - ['namespace']: bufferCVFromString('btc'), - }) - ), + const { data: nftHistory } = await apiClient.GET(`/extended/v1/tokens/nft/history`, { + params: { + query: { + asset_identifier: BTC_BNS_CONTRACT, + value: cvToHex( + tupleCV({ + ['name']: bufferCVFromString(bnsName.replace(new RegExp('.btc$'), '')), + ['namespace']: bufferCVFromString('btc'), + }) + ), + tx_metadata: false, + }, + }, }); - if (nftHistory.results.length) { + + if (nftHistory?.results.length) { return nftHistoryToSearchResult(nftHistory.results[0], bnsName); } } catch (e) {} @@ -225,11 +227,10 @@ export function useSearchPageUrl(searchTerm: string, network: Network) { export function useSearchQuery(id: string) { const dispatch = useAppDispatch(); - const { searchApi, blocksApi, nonFungibleTokensApi } = useApi(); const isBtcName = id.endsWith('.btc'); const advancedSearchQuery = parseAdvancedSearchQuery(id); const isAdvancedSearch = advancedSearchQuery.length > 0; - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['search', isAdvancedSearch ? JSON.stringify(advancedSearchQuery) : id], queryFn: async () => { @@ -254,12 +255,12 @@ export function useSearchQuery(id: string) { const toFilter = advancedSearchQuery.find(({ filterName }) => filterName === 'toAddress'); if (fromFilter?.filterValue?.endsWith('.btc')) { fromFilter.filterValue = - (await searchByBnsName(api, fromFilter.filterValue))?.result.entity_id || + (await searchByBnsName(apiClient, fromFilter.filterValue))?.result.entity_id || fromFilter.filterValue; } if (toFilter?.filterValue?.endsWith('.btc')) { toFilter.filterValue = - (await searchByBnsName(api, toFilter.filterValue))?.result.entity_id || + (await searchByBnsName(apiClient, toFilter.filterValue))?.result.entity_id || toFilter.filterValue; } const fromAddress = advancedSearchQuery.find( @@ -276,17 +277,24 @@ export function useSearchQuery(id: string) { .reduce((acc, { filterValue }) => acc + filterValue + ' ', '') .trim(); // TODO: use term when it's supported - const txsResponse = await api.transactionsApi.getTransactionList({ - limit: 5, - offset: 0, - unanchored: true, - sortBy: GetTransactionListSortByEnum.burn_block_time, - order: GetTransactionListOrderEnum.desc, - ...(fromAddress && { fromAddress: fromAddress }), - ...(toAddress && { toAddress: toAddress }), - ...(startTime && { startTime: Number(startTime) }), - ...(endTime && { endTime: Number(endTime) }), + const { data: txsResponse, error } = await apiClient.GET('/extended/v1/tx/', { + params: { + query: { + limit: 5, + offset: 0, + unanchored: true, + sortBy: 'burn_block_time', + order: 'desc', + ...(fromAddress && { fromAddress: fromAddress }), + ...(toAddress && { toAddress: toAddress }), + ...(startTime && { startTime: Number(startTime) }), + ...(endTime && { endTime: Number(endTime) }), + }, + }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } const txs = (txsResponse?.results as Transaction[]) || ([] as Transaction[]); foundResult = { found: true, @@ -300,18 +308,24 @@ export function useSearchQuery(id: string) { }, }; } else if (isBtcName) { - foundResult = await searchByBnsName(api, id); + foundResult = await searchByBnsName(apiClient, id); } else if (isNumeric(id)) { // Fetch block height if numeric try { - const block = await blocksApi.getBlockByHeight({ height: parseInt(id) }); + const height = parseInt(id); + const { data: block } = await apiClient.GET('/extended/v1/block/by_height/{height}', { + params: { path: { height } }, + }); if (block) { foundResult = blockToSearchResult(block); } } catch (e) {} } else { try { - foundResult = (await searchApi.searchById({ id, includeMetadata: true })) as FoundResult; // TODO: The API needs to add the type + const { data } = await apiClient.GET('/extended/v1/search/{id}', { + params: { path: { id }, query: { include_metadata: true } }, + }); + foundResult = data as FoundResult; } catch (e: any) { try { const data = await e.json(); diff --git a/src/common/queries/useTxById.ts b/src/common/queries/useTxById.ts index d2889c153..ba7053d3d 100644 --- a/src/common/queries/useTxById.ts +++ b/src/common/queries/useTxById.ts @@ -7,22 +7,29 @@ import { import { MempoolTransaction, Transaction } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_TX_EVENTS_LIMIT } from '../constants/constants'; export function useTxById( txId?: string, options: any = {} ): UseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useQuery({ queryKey: ['txById', txId], - queryFn: () => { - return api.transactionsApi.getTransactionById({ - txId: txId!, - eventLimit: DEFAULT_TX_EVENTS_LIMIT, - eventOffset: 0, + queryFn: async () => { + if (!txId) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/{tx_id}', { + params: { + path: { tx_id: txId }, + query: { event_limit: DEFAULT_TX_EVENTS_LIMIT, event_offset: 0 }, + }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: Infinity, enabled: !!txId, @@ -34,15 +41,21 @@ export function useSuspenseTxById( txId: string, options: any = {} ): UseSuspenseQueryResult { - const api = useApi(); + const apiClient = useApiClient(); return useSuspenseQuery({ queryKey: ['txById', txId], - queryFn: () => { - return api.transactionsApi.getTransactionById({ - txId, - eventLimit: DEFAULT_TX_EVENTS_LIMIT, - eventOffset: 0, + queryFn: async () => { + if (!txId) return undefined; + const { data, error } = await apiClient.GET('/extended/v1/tx/{tx_id}', { + params: { + path: { tx_id: txId }, + query: { event_limit: DEFAULT_TX_EVENTS_LIMIT, event_offset: 0 }, + }, }); + if (error) { + throw new Error(getErrorMessage(error)); + } + return data; }, staleTime: Infinity, ...options, diff --git a/src/common/queries/useTxEventsByIdInfinite.ts b/src/common/queries/useTxEventsByIdInfinite.ts index 6c7cf64ab..c6ef490f4 100644 --- a/src/common/queries/useTxEventsByIdInfinite.ts +++ b/src/common/queries/useTxEventsByIdInfinite.ts @@ -2,7 +2,8 @@ import { InfiniteData, UseInfiniteQueryResult, useInfiniteQuery } from '@tanstac import { Transaction, TransactionEvent } from '@stacks/stacks-blockchain-api-types'; -import { useApi } from '../api/useApi'; +import { getErrorMessage } from '../../api/getErrorMessage'; +import { useApiClient } from '../../api/useApiClient'; import { DEFAULT_TX_EVENTS_LIMIT } from '../constants/constants'; import { GenericResponseType } from '../hooks/useInfiniteQueryResult'; import { getNextPageParam } from '../utils/utils'; @@ -11,18 +12,22 @@ export function useTxEventsByIdInfinite( txId: string, options: any = {} ): UseInfiniteQueryResult>> { - const api = useApi(); + const apiClient = useApiClient(); return useInfiniteQuery({ queryKey: ['tx-by-id-infinite', txId], queryFn: async ({ pageParam }: { pageParam?: number }) => { - const tx = (await api.transactionsApi.getTransactionById({ - txId, - eventLimit: DEFAULT_TX_EVENTS_LIMIT, - eventOffset: pageParam, - })) as Transaction; + const { data: tx, error } = await apiClient.GET('/extended/v1/tx/{tx_id}', { + params: { + path: { tx_id: txId }, + query: { event_limit: DEFAULT_TX_EVENTS_LIMIT, event_offset: pageParam }, + }, + }); + if (error) { + throw new Error(getErrorMessage(error)); + } return { - results: tx.events, - total: tx.event_count, + results: (tx as Transaction).events, + total: (tx as Transaction).event_count, limit: DEFAULT_TX_EVENTS_LIMIT, offset: pageParam, }; diff --git a/src/features/txsFilterAndSort/SortMenu.tsx b/src/features/txsFilterAndSort/SortMenu.tsx index dfa7ab4aa..abb208fd6 100644 --- a/src/features/txsFilterAndSort/SortMenu.tsx +++ b/src/features/txsFilterAndSort/SortMenu.tsx @@ -1,49 +1,42 @@ import { SortDescending } from '@phosphor-icons/react'; import { useCallback, useMemo } from 'react'; -import { - GetMempoolTransactionListOrderByEnum, - GetMempoolTransactionListOrderEnum, - GetTransactionListOrderEnum, - GetTransactionListSortByEnum, -} from '@stacks/blockchain-api-client'; +import { operations } from '@stacks/blockchain-api-client/lib/generated/schema'; import { FilterMenu } from '../../common/components/FilterMenu'; import { useFilterAndSortState } from './useFilterAndSortState'; -function getMempoolTxsSortOptionLabel( - sort: GetMempoolTransactionListOrderByEnum, - order: GetMempoolTransactionListOrderEnum -) { +type MempoolQuery = NonNullable; +type MempoolOrderBy = Exclude; +type MempoolOrder = Exclude; +const MempoolOrderByVals: MempoolOrderBy[] = ['age', 'size', 'fee']; +const MempoolOrderVals: MempoolOrder[] = ['asc', 'desc']; + +type TxsQuery = NonNullable; +type txSortBy = Exclude; +type txOrder = Exclude; +const txSortByVals: txSortBy[] = ['block_height', 'fee', 'burn_block_time']; +const txOrderVals: txOrder[] = ['asc', 'desc']; + +export function getMempoolTxsSortOptionLabel(sort: MempoolOrderBy, order: MempoolOrder) { switch (sort) { - case GetMempoolTransactionListOrderByEnum.age: - return order === GetMempoolTransactionListOrderEnum.asc ? 'Oldest first' : 'Newest first'; - case GetMempoolTransactionListOrderByEnum.size: - return order === GetMempoolTransactionListOrderEnum.asc - ? 'Smallest size first' - : 'Biggest size first'; - case GetMempoolTransactionListOrderByEnum.fee: - return order === GetMempoolTransactionListOrderEnum.asc - ? 'Lowest fee first' - : 'Highest fee first'; + case 'age': + return order === 'asc' ? 'Oldest first' : 'Newest first'; + case 'size': + return order === 'asc' ? 'Smallest size first' : 'Biggest size first'; + case 'fee': + return order === 'asc' ? 'Lowest fee first' : 'Highest fee first'; } } -function getConfirmedTxsSortOptionLabel( - sort: GetTransactionListSortByEnum, - order: GetTransactionListOrderEnum -) { +function getConfirmedTxsSortOptionLabel(sort: string, order: 'asc' | 'desc' | undefined) { switch (sort) { - case GetTransactionListSortByEnum.block_height: - return order === GetTransactionListOrderEnum.asc - ? 'Lowest block height first' - : 'Highest block height first'; - case GetTransactionListSortByEnum.fee: - return order === GetTransactionListOrderEnum.asc - ? 'Lowest transaction fee first' - : 'Highest transaction fee first'; - case GetTransactionListSortByEnum.burn_block_time: - return order === GetTransactionListOrderEnum.asc ? 'Oldest first' : 'Newest first'; + case 'block_height': + return order === 'asc' ? 'Lowest block height first' : 'Highest block height first'; + case 'fee': + return order === 'asc' ? 'Lowest transaction fee first' : 'Highest transaction fee first'; + case 'burn_block_time': + return order === 'asc' ? 'Oldest first' : 'Newest first'; } } @@ -62,19 +55,14 @@ export function MempoolTxsSortMenu() { const menuItems = useMemo( () => - Object.keys(GetMempoolTransactionListOrderByEnum).flatMap(sort => - Object.keys(GetMempoolTransactionListOrderEnum) - .reverse() - .map(order => ({ - onClick: () => { - setMempoolTxsActiveSort(sort as GetMempoolTransactionListOrderByEnum); - setMempoolTxsActiveOrder(order as GetMempoolTransactionListOrderEnum); - }, - label: getMempoolTxsSortOptionLabel( - sort as GetMempoolTransactionListOrderByEnum, - order as GetMempoolTransactionListOrderEnum - ), - })) + MempoolOrderByVals.flatMap(sort => + MempoolOrderVals.reverse().map(order => ({ + onClick: () => { + setMempoolTxsActiveSort(sort); + setMempoolTxsActiveOrder(order); + }, + label: getMempoolTxsSortOptionLabel(sort, order), + })) ), [setMempoolTxsActiveSort, setMempoolTxsActiveOrder] ); @@ -97,19 +85,14 @@ export function ConfirmedTxsSortMenu() { const menuItems = useMemo( () => - Object.keys(GetTransactionListSortByEnum).flatMap(sort => - Object.keys(GetTransactionListOrderEnum) - .reverse() - .map(order => ({ - onClick: () => { - setConfirmedTxsActiveSort(sort as GetTransactionListSortByEnum); - setConfirmedTxsActiveOrder(order as GetTransactionListOrderEnum); - }, - label: getConfirmedTxsSortOptionLabel( - sort as GetTransactionListSortByEnum, - order as GetTransactionListOrderEnum - ), - })) + txSortByVals.flatMap(sort => + txOrderVals.reverse().map(order => ({ + onClick: () => { + setConfirmedTxsActiveSort(sort); + setConfirmedTxsActiveOrder(order); + }, + label: getConfirmedTxsSortOptionLabel(sort, order), + })) ), [setConfirmedTxsActiveSort, setConfirmedTxsActiveOrder] ); diff --git a/src/features/txsFilterAndSort/txsFilterAndSortSlice.ts b/src/features/txsFilterAndSort/txsFilterAndSortSlice.ts index 9fb95765b..476fbc99a 100644 --- a/src/features/txsFilterAndSort/txsFilterAndSortSlice.ts +++ b/src/features/txsFilterAndSort/txsFilterAndSortSlice.ts @@ -1,14 +1,17 @@ import { PayloadAction, Reducer, createSelector, createSlice } from '@reduxjs/toolkit'; -import { - GetMempoolTransactionListOrderByEnum, - GetMempoolTransactionListOrderEnum, - GetTransactionListOrderEnum, -} from '@stacks/blockchain-api-client'; -import { GetTransactionListSortByEnum } from '@stacks/blockchain-api-client'; +import { operations } from '@stacks/blockchain-api-client/lib/generated/schema'; import { RootState } from '../../common/state/store'; +type MempoolQuery = NonNullable; +type MempoolOrderBy = Exclude; +type MempoolOrder = Exclude; + +type TxsQuery = NonNullable; +type TxSortBy = Exclude; +type TxOrder = Exclude; + export enum TxFilterAndSortTypes { HomepageTxFilter = 'HomepageTxFilter', TxsPageTxFilter = 'TxsPageTxFilter', @@ -23,19 +26,19 @@ export type TxFilters = { [key in TxFilterAndSortTypes]: TxFilterAndSortState }; export interface TxFilterAndSortState { activeFilters: string[]; - activeMempoolTxsSort: GetMempoolTransactionListOrderByEnum; - activeMempoolTxsOrder: GetMempoolTransactionListOrderEnum; - activeConfirmedTxsSort: GetTransactionListSortByEnum; - activeConfirmedTxsOrder: GetTransactionListOrderEnum; + activeMempoolTxsSort: MempoolOrderBy; + activeMempoolTxsOrder: MempoolOrder; + activeConfirmedTxsSort: TxSortBy; + activeConfirmedTxsOrder: TxOrder; isVisible: boolean; } export const initialState: TxFilterAndSortState = { activeFilters: [], - activeMempoolTxsSort: GetMempoolTransactionListOrderByEnum.age, - activeMempoolTxsOrder: GetMempoolTransactionListOrderEnum.desc, - activeConfirmedTxsSort: GetTransactionListSortByEnum.burn_block_time, - activeConfirmedTxsOrder: GetTransactionListOrderEnum.desc, + activeMempoolTxsSort: 'age', + activeMempoolTxsOrder: 'desc', + activeConfirmedTxsSort: 'burn_block_time', + activeConfirmedTxsOrder: 'desc', isVisible: false, }; @@ -48,26 +51,17 @@ const createSliceOptions = (filterType: TxFilterAndSortTypes) => ({ }, setMempoolTxsActiveSort: ( state: TxFilterAndSortState, - action: PayloadAction + action: PayloadAction ) => { state.activeMempoolTxsSort = action.payload; }, - setMempoolTxsActiveOrder: ( - state: TxFilterAndSortState, - action: PayloadAction - ) => { + setMempoolTxsActiveOrder: (state: TxFilterAndSortState, action: PayloadAction) => { state.activeMempoolTxsOrder = action.payload; }, - setConfirmedTxsActiveSort: ( - state: TxFilterAndSortState, - action: PayloadAction - ) => { + setConfirmedTxsActiveSort: (state: TxFilterAndSortState, action: PayloadAction) => { state.activeConfirmedTxsSort = action.payload; }, - setConfirmedTxsActiveOrder: ( - state: TxFilterAndSortState, - action: PayloadAction - ) => { + setConfirmedTxsActiveOrder: (state: TxFilterAndSortState, action: PayloadAction) => { state.activeConfirmedTxsOrder = action.payload; }, }, diff --git a/src/features/txsFilterAndSort/useFilterAndSortState.tsx b/src/features/txsFilterAndSort/useFilterAndSortState.tsx index 2a00d6e1d..1abe02f5d 100644 --- a/src/features/txsFilterAndSort/useFilterAndSortState.tsx +++ b/src/features/txsFilterAndSort/useFilterAndSortState.tsx @@ -1,16 +1,19 @@ 'use client'; -import { - GetMempoolTransactionListOrderByEnum, - GetMempoolTransactionListOrderEnum, - GetTransactionListOrderEnum, - GetTransactionListSortByEnum, -} from '@stacks/blockchain-api-client'; +import { operations } from '@stacks/blockchain-api-client/lib/generated/schema'; import { useAppDispatch, useAppSelector } from '../../common/state/hooks'; import { txFilterAndSort } from './txsFilterAndSortSlice'; import { useFilterAndSortScope } from './useFilterAndSortScope'; +type MempoolQuery = NonNullable; +type MempoolOrderBy = Exclude; +type MempoolOrder = Exclude; + +type TxsQuery = NonNullable; +type TxSortBy = Exclude; +type TxOrder = Exclude; + export const useFilterAndSortState = () => { const dispatch = useAppDispatch(); const filterScope = useFilterAndSortScope(); @@ -19,19 +22,19 @@ export const useFilterAndSortState = () => { dispatch(txFilterAndSort[filterScope].actions.setActiveFilters(filters)); }; - const setMempoolTxsActiveSort = (sort: GetMempoolTransactionListOrderByEnum) => { + const setMempoolTxsActiveSort = (sort: MempoolOrderBy) => { dispatch(txFilterAndSort[filterScope].actions.setMempoolTxsActiveSort(sort)); }; - const setMempoolTxsActiveOrder = (order: GetMempoolTransactionListOrderEnum) => { + const setMempoolTxsActiveOrder = (order: MempoolOrder) => { dispatch(txFilterAndSort[filterScope].actions.setMempoolTxsActiveOrder(order)); }; - const setConfirmedTxsActiveSort = (sort: GetTransactionListSortByEnum) => { + const setConfirmedTxsActiveSort = (sort: TxSortBy) => { dispatch(txFilterAndSort[filterScope].actions.setConfirmedTxsActiveSort(sort)); }; - const setConfirmedTxsActiveOrder = (order: GetTransactionListOrderEnum) => { + const setConfirmedTxsActiveOrder = (order: TxOrder) => { dispatch(txFilterAndSort[filterScope].actions.setConfirmedTxsActiveOrder(order)); };