diff --git a/package.json b/package.json index a8841527..231ff420 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,14 @@ "@noble/hashes": "1.3.2", "@reduxjs/toolkit": "1.9.7", "@scure/base": "1.1.3", - "@stacks/auth": "6.13.0", + "@stacks/auth": "7.0.2", "@stacks/blockchain-api-client": "7.3.2", - "@stacks/common": "6.8.1", - "@stacks/connect": "7.7.0", - "@stacks/connect-react": "22.4.0", - "@stacks/network": "6.8.1", - "@stacks/stacking": "6.13.2", - "@stacks/transactions": "6.13.0", + "@stacks/common": "7.0.2", + "@stacks/connect": "7.9.0", + "@stacks/connect-react": "22.6.0", + "@stacks/network": "7.0.2", + "@stacks/stacking": "7.0.2", + "@stacks/transactions": "7.0.2", "@stacks/ui": "7.10.0", "@stacks/ui-core": "7.3.0", "@stacks/ui-theme": "7.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0409d195..8a5c65ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 11.11.1(@types/react@18.2.13)(react@18.2.0) '@emotion/styled': specifier: 11.11.0 - version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.13)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(@types/react@18.2.13)(react@18.2.0) '@noble/hashes': specifier: 1.3.2 version: 1.3.2 @@ -24,35 +24,35 @@ importers: specifier: 1.1.3 version: 1.1.3 '@stacks/auth': - specifier: 6.13.0 - version: 6.13.0 + specifier: 7.0.2 + version: 7.0.2 '@stacks/blockchain-api-client': specifier: 7.3.2 version: 7.3.2 '@stacks/common': - specifier: 6.8.1 - version: 6.8.1 + specifier: 7.0.2 + version: 7.0.2 '@stacks/connect': - specifier: 7.7.0 - version: 7.7.0 + specifier: 7.9.0 + version: 7.9.0 '@stacks/connect-react': - specifier: 22.4.0 - version: 22.4.0(react-dom@18.2.0)(react@18.2.0) + specifier: 22.6.0 + version: 22.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@stacks/network': - specifier: 6.8.1 - version: 6.8.1 + specifier: 7.0.2 + version: 7.0.2 '@stacks/stacking': - specifier: 6.13.2 - version: 6.13.2 + specifier: 7.0.2 + version: 7.0.2 '@stacks/transactions': - specifier: 6.13.0 - version: 6.13.0 + specifier: 7.0.2 + version: 7.0.2 '@stacks/ui': specifier: 7.10.0 - version: 7.10.0(@emotion/core@11.0.0)(@emotion/react@11.11.1)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0) + version: 7.10.0(@emotion/core@11.0.0)(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@stacks/ui-core': specifier: 7.3.0 - version: 7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1)(react@18.2.0) + version: 7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(react@18.2.0) '@stacks/ui-theme': specifier: 7.5.0 version: 7.5.0 @@ -61,10 +61,10 @@ importers: version: 2.39.0(react@18.2.0) '@tanstack/react-query': specifier: 4.36.1 - version: 4.36.1(react-dom@18.2.0)(react@18.2.0) + version: 4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@tippyjs/react': specifier: 4.2.6 - version: 4.2.6(react-dom@18.2.0)(react@18.2.0) + version: 4.2.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@types/cookie': specifier: 0.5.2 version: 0.5.2 @@ -106,7 +106,7 @@ importers: version: 18.2.0 react-card-flip: specifier: 1.2.0 - version: 1.2.0(react-dom@18.2.0)(react@18.2.0) + version: 1.2.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react-cookie: specifier: 4.1.1 version: 4.1.1(react@18.2.0) @@ -118,10 +118,10 @@ importers: version: 4.9.0(react@18.2.0) react-redux: specifier: 8.1.0 - version: 8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) + version: 8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) react-router-dom: specifier: 6.13.0 - version: 6.13.0(react-dom@18.2.0)(react@18.2.0) + version: 6.13.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) rollup-plugin-polyfill-node: specifier: 0.12.0 version: 0.12.0(rollup@3.25.1) @@ -142,7 +142,7 @@ importers: version: 1.0.9 vite-plugin-node-stdlib-browser: specifier: 0.2.1 - version: 0.2.1(node-stdlib-browser@1.2.0)(rollup@3.25.1)(vite@4.3.9) + version: 0.2.1(node-stdlib-browser@1.2.0)(rollup@3.25.1)(vite@4.3.9(@types/node@20.3.1)) vitest: specifier: ^0.32.4 version: 0.32.4 @@ -185,13 +185,13 @@ importers: version: 1.0.4 '@typescript-eslint/eslint-plugin': specifier: 5.55.0 - version: 5.55.0(@typescript-eslint/parser@5.55.0)(eslint@8.43.0)(typescript@5.0.3) + version: 5.55.0(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint@8.43.0)(typescript@5.0.3) '@typescript-eslint/parser': specifier: 5.55.0 version: 5.55.0(eslint@8.43.0)(typescript@5.0.3) '@vitejs/plugin-react': specifier: 4.0.0 - version: 4.0.0(vite@4.3.9) + version: 4.0.0(vite@4.3.9(@types/node@20.3.1)) '@vue/compiler-sfc': specifier: 3.3.4 version: 3.3.4 @@ -206,7 +206,7 @@ importers: version: 8.8.0(eslint@8.43.0) eslint-plugin-import: specifier: 2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.55.0)(eslint@8.43.0) + version: 2.27.5(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint@8.43.0) eslint-plugin-jsx-a11y: specifier: 6.7.1 version: 6.7.1(eslint@8.43.0) @@ -242,7 +242,7 @@ importers: version: 3.6.1 vite-tsconfig-paths: specifier: 4.2.0 - version: 4.2.0(typescript@5.0.3)(vite@4.3.9) + version: 4.2.0(typescript@5.0.3)(vite@4.3.9(@types/node@20.3.1)) packages: @@ -1380,59 +1380,47 @@ packages: '@socket.io/component-emitter@3.1.0': resolution: {integrity: sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==} - '@stacks/auth@6.13.0': - resolution: {integrity: sha512-3a6FwP5yNngQfalu78MltQzCROL4l+MNngnCxFKo52EJfIdJp8TWKuwkzHN/jLzrvdUoq1lQjKlxoINCiUP03g==} + '@stacks/auth@7.0.2': + resolution: {integrity: sha512-1N0ylkK9mz6RqIH3SbuIvoUG4eTgSkun7hHiPirScGCyXvmugjereGdTowSRSrEnl32/qrnquAAaO7a1XF6TMA==} '@stacks/blockchain-api-client@7.3.2': resolution: {integrity: sha512-nhFDpA2d5mN2YCmllIUrmkQzd5CEtqAR9XUUrvVOKsLw7pdkF21grbd8ZbKARFLR/l0rYwHB8YW2sL2fv8Ty/A==} - '@stacks/common@6.13.0': - resolution: {integrity: sha512-wwzyihjaSdmL6NxKvDeayy3dqM0L0Q2sawmdNtzJDi0FnXuJGm5PeapJj7bEfcI9XwI7Bw5jZoC6mCn9nc5YIw==} + '@stacks/common@6.16.0': + resolution: {integrity: sha512-PnzvhrdGRMVZvxTulitlYafSK4l02gPCBBoI9QEoTqgSnv62oaOXhYAUUkTMFKxdHW1seVEwZsrahuXiZPIAwg==} - '@stacks/common@6.8.1': - resolution: {integrity: sha512-ewL9GLZNQYa5a/3K4xSHlHIgHkD4rwWW/QEaPId8zQIaL+1O9qCaF4LX9orNQeOmEk8kvG0x2xGV54fXKCZeWQ==} + '@stacks/common@7.0.2': + resolution: {integrity: sha512-+RSecHdkxOtswmE4tDDoZlYEuULpnTQVeDIG5eZ32opK8cFxf4EugAcK9CsIsHx/Se1yTEaQ21WGATmJGK84lQ==} - '@stacks/connect-react@22.4.0': - resolution: {integrity: sha512-+ojenPvGqB56eloS2MbqHpCYXphA6xfsOFLA9q5N9AWvuzYm7DklURhalsTm2MIcBnoRj812MDsZ9QXH2OyMQg==} + '@stacks/connect-react@22.6.0': + resolution: {integrity: sha512-+ANQyxujO7ObrPps/Ix9y13a6yGhFbZSHbJW00bPNeYdo2YLxZHbPVCd0VWRdLO7O3y4kRi+nUH0zeWWJYHIbA==} peerDependencies: react: ^16.x || 17.x || 18.x react-dom: ^16.x || 17.x || 18.x - '@stacks/connect-ui@6.3.0': - resolution: {integrity: sha512-d6MjLO+MrIghPDb94rJNJeeBucDh9MxbWTNU3P0n82zTBL0zDurcQlvAdoOnvIRUbYo6oZghhgRg3TuvRYATWw==} - - '@stacks/connect-ui@6.4.0': - resolution: {integrity: sha512-S9+gOZAv05GxMBBIKq86eODzhWl98gUEKEdvzZTsoEZVQ3K1CwkTv1gQ/Hup5J35OKbTVT7m10mbalVNVcjARQ==} + '@stacks/connect-ui@6.5.0': + resolution: {integrity: sha512-iXSpl2NxrjERBqtGgkZp0tX1uJgdWZXmsNo3I0cJYYTTbieSAE/Al9nTYc1wLTPW5w5oVvZEkQKo90WIrHR8Rw==} - '@stacks/connect@7.6.0': - resolution: {integrity: sha512-kFXUmuUb5N4TeeecZGfKM7xE402hSodCAyeSDZ5CFLmHkJaD1PLu+y9NzW1XW7hYA4lfR8qkuhjgOdywsURB2w==} + '@stacks/connect@7.9.0': + resolution: {integrity: sha512-UPv2UQpZwnNPYodL4bf+6Pu3kHY9BcRabAgAbmDajn3RFWvDrnOMmvLqJRGOvo5fEm8vSwxAGY8R7BSOPmlLdg==} - '@stacks/connect@7.7.0': - resolution: {integrity: sha512-Psg1xKOjQieqSf4pd1rsV9f/9Ai7xEQ7qVtYDE9F6aYZRVh4xPfWt5TiWZI6r/w4ftPCcgzlCqPRgBJiOXf+Zw==} + '@stacks/encryption@7.0.2': + resolution: {integrity: sha512-3evRvxPqVzQAhcZ8uacQrVfAETUMIV8VyKkHGsd4QZroGWlvXQheLV3CFeDttFb304QcKq/oKv1clOvQ2shaAw==} - '@stacks/encryption@6.13.0': - resolution: {integrity: sha512-CsacBxY1XBVXBuJ5erJPjB5FmQ8KGJ/ft02/pIM6WrJ31ZcBdkn2BPV1AsPSD5qsIkiMdHAe14WKIwm8M2SWtQ==} + '@stacks/network@6.17.0': + resolution: {integrity: sha512-numHbfKjwco/rbkGPOEz8+FcJ2nBnS/tdJ8R422Q70h3SiA9eqk9RjSzB8p4JP8yW1SZvW+eihADHfMpBuZyfw==} - '@stacks/encryption@6.13.1': - resolution: {integrity: sha512-y5IFX3/nGI3fCk70gE0JwH70GpshD8RhUfvhMLcL96oNaec1cCdj1ZUiQupeicfYTHuraaVBYU9xLls4TRmypg==} - - '@stacks/network@6.13.0': - resolution: {integrity: sha512-Ss/Da4BNyPBBj1OieM981fJ7SkevKqLPkzoI1+Yo7cYR2df+0FipIN++Z4RfpJpc8ne60vgcx7nJZXQsiGhKBQ==} - - '@stacks/network@6.8.1': - resolution: {integrity: sha512-n8M25pPbLqpSBctabtsLOTBlmPvm9EPQpTI//x7HLdt5lEjDXxauEQt0XGSvDUZwecrmztqt9xNxlciiGApRBw==} + '@stacks/network@7.0.2': + resolution: {integrity: sha512-XzHnoWqku/jRrTgMXhmh3c+I0O9vDH24KlhzGDZtBu+8CGGyHNPAZzGwvoUShonMXrXjEnfO9IYQwV5aJhfv6g==} '@stacks/prettier-config@0.0.10': resolution: {integrity: sha512-MrYWGEgO/mYR8TOZIKknQEHbFQZ5VyAD/s8eF2Yxr6Lgalt2alVEh+6ODehVP2uepkyXPmJzLbaQYs8/L4E78Q==} - '@stacks/profile@6.13.0': - resolution: {integrity: sha512-IIOPtP+bHu53j426UTFn+JFgv9G3JyybtJ6TDcc4zxoMvs8sLKEVTyjZNFrP38DjkoAGo1qWNWqoJhURfL55Uw==} - - '@stacks/profile@6.9.0': - resolution: {integrity: sha512-sIR60DsAHi8C6zGqKqSe1r2hXTMHgwrJkX3fAaP3de40KeplZ2bkE+0B83yismEeU2baNc+AukyVvWJv0PfP0A==} + '@stacks/profile@7.0.2': + resolution: {integrity: sha512-BJis1ZAP2yzv0IFaJcm4mZFtauizcB1zBVpAeOSX06BDEUgM8h0L8uRvAbfTvSuSjsveNgblucZouZMSEsQMGA==} - '@stacks/stacking@6.13.2': - resolution: {integrity: sha512-4h1UQuL2+Xdra9zMqzUElvKG9X9fenuNE7hD9sIqyxyLFxeQ7gRqczmTYPsmaj4wY5004JNj+efzGJ0VmpOcAA==} + '@stacks/stacking@7.0.2': + resolution: {integrity: sha512-JAi396fKMgA0v8Lrj6yYNKRBuPHT+dq1/vVs1GCpgbH74ZHQT6NQYBrsnIxtc85M9w86zMr1FHrIq66Z0kKh/A==} '@stacks/stacks-blockchain-api-types@0.61.0': resolution: {integrity: sha512-yPOfTUboo5eA9BZL/hqMcM71GstrFs9YWzOrJFPeP4cOO1wgYvAcckgBRbgiE3NqeX0A7SLZLDAXLZbATuRq9w==} @@ -1440,11 +1428,11 @@ packages: '@stacks/stacks-blockchain-api-types@7.3.2': resolution: {integrity: sha512-1r0+eqEWOOo7UYrFq9HGbc02DVME3NVCW/45sNKPN31PkOMMaK59DHragPJ2QbxPFiutVDUCS924+48+o3+0Tw==} - '@stacks/transactions@6.13.0': - resolution: {integrity: sha512-xrx09qsXL/tWCkvAArzsFQqtZKDXyedjdVB9uX8xw+cQCi3xZ7r5MHMKzvEsTgJz3EO+MkQBXcvI1uzfuoqhcA==} + '@stacks/transactions@6.17.0': + resolution: {integrity: sha512-FUah2BRgV66ApLcEXGNGhwyFTRXqX5Zco3LpiM3essw8PF0NQlHwwdPgtDko5RfrJl3LhGXXe/30nwsfNnB3+g==} - '@stacks/transactions@6.13.1': - resolution: {integrity: sha512-PWw2I+2Fj3CaFYQIoVcqQN6E2qGHNhFv03nuR0CxMq0sx8stPgYZbdzUlnlBcJQdsFiHrw3sPeqnXDZt+Hg5YQ==} + '@stacks/transactions@7.0.2': + resolution: {integrity: sha512-m2bvchqUeYv1ttXuC0EukW8UX4xBXTDcYb8bXmfI1RG89HXAvvCCgr5aiadU6zbutgoXvm8mquDt3nww0PO4Jg==} '@stacks/ui-core@7.3.0': resolution: {integrity: sha512-q3ZBu2uk/MMFsBGNZ8aT6stbwqaHuQTatDwS2A8a1gM+Csb/souJD6uY0Nf3R/z4IDCUGT6SYlvd8+lYgTAxzA==} @@ -3930,9 +3918,10 @@ snapshots: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.13 hoist-non-react-statics: 3.3.2 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.13 '@emotion/serialize@1.1.2': dependencies: @@ -3944,7 +3933,7 @@ snapshots: '@emotion/sheet@1.2.2': {} - '@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.13)(react@18.2.0)': + '@emotion/styled@11.11.0(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(@types/react@18.2.13)(react@18.2.0)': dependencies: '@babel/runtime': 7.22.6 '@emotion/babel-plugin': 11.11.0 @@ -3953,8 +3942,9 @@ snapshots: '@emotion/serialize': 1.1.2 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 - '@types/react': 18.2.13 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.13 '@emotion/unitless@0.8.1': {} @@ -4243,34 +4233,34 @@ snapshots: '@popperjs/core@2.11.8': {} - '@reach/alert@0.13.2(react-dom@18.2.0)(react@18.2.0)': + '@reach/alert@0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: - '@reach/utils': 0.13.2(react-dom@18.2.0)(react@18.2.0) - '@reach/visually-hidden': 0.13.2(react-dom@18.2.0)(react@18.2.0) + '@reach/utils': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@reach/visually-hidden': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) tslib: 2.6.0 - '@reach/auto-id@0.13.2(react-dom@18.2.0)(react@18.2.0)': + '@reach/auto-id@0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: - '@reach/utils': 0.13.2(react-dom@18.2.0)(react@18.2.0) + '@reach/utils': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) tslib: 2.6.0 '@reach/observe-rect@1.2.0': {} - '@reach/rect@0.13.2(react-dom@18.2.0)(react@18.2.0)': + '@reach/rect@0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@reach/observe-rect': 1.2.0 - '@reach/utils': 0.13.2(react-dom@18.2.0)(react@18.2.0) + '@reach/utils': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) tslib: 2.6.0 - '@reach/utils@0.13.2(react-dom@18.2.0)(react@18.2.0)': + '@reach/utils@0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@types/warning': 3.0.0 react: 18.2.0 @@ -4278,7 +4268,7 @@ snapshots: tslib: 2.6.0 warning: 4.0.3 - '@reach/visually-hidden@0.13.2(react-dom@18.2.0)(react@18.2.0)': + '@reach/visually-hidden@0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: prop-types: 15.8.1 react: 18.2.0 @@ -4307,7 +4297,7 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/calendar@3.4.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/calendar@3.4.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@internationalized/date': 3.3.0 '@react-aria/i18n': 3.8.0(react@18.2.0) @@ -4334,14 +4324,14 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/combobox@3.6.2(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/combobox@3.6.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/listbox': 3.10.0(react@18.2.0) '@react-aria/live-announcer': 3.3.1 - '@react-aria/menu': 3.10.0(react-dom@18.2.0)(react@18.2.0) - '@react-aria/overlays': 3.15.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/menu': 3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-aria/overlays': 3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/selection': 3.16.0(react@18.2.0) '@react-aria/textfield': 3.10.0(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) @@ -4355,7 +4345,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@react-aria/datepicker@3.5.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/datepicker@3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@internationalized/date': 3.3.0 '@internationalized/number': 3.2.1 @@ -4364,7 +4354,7 @@ snapshots: '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/label': 3.6.0(react@18.2.0) - '@react-aria/spinbutton': 3.5.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/spinbutton': 3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-stately/datepicker': 3.5.0(react@18.2.0) '@react-types/button': 3.7.3(react@18.2.0) @@ -4376,10 +4366,10 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@react-aria/dialog@3.5.3(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/dialog@3.5.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) - '@react-aria/overlays': 3.15.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/overlays': 3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-stately/overlays': 3.6.0(react@18.2.0) '@react-types/dialog': 3.5.3(react@18.2.0) @@ -4389,13 +4379,13 @@ snapshots: transitivePeerDependencies: - react-dom - '@react-aria/dnd@3.3.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/dnd@3.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@internationalized/string': 3.1.1 '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/live-announcer': 3.3.1 - '@react-aria/overlays': 3.15.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/overlays': 3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-aria/visually-hidden': 3.8.2(react@18.2.0) '@react-stately/dnd': 3.2.2(react@18.2.0) @@ -4414,7 +4404,7 @@ snapshots: clsx: 1.2.1 react: 18.2.0 - '@react-aria/grid@3.8.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/grid@3.8.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) @@ -4433,10 +4423,10 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@react-aria/gridlist@3.5.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/gridlist@3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) - '@react-aria/grid': 3.8.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/grid': 3.8.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/selection': 3.16.0(react@18.2.0) @@ -4505,12 +4495,12 @@ snapshots: dependencies: '@swc/helpers': 0.5.1 - '@react-aria/menu@3.10.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/menu@3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) - '@react-aria/overlays': 3.15.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/overlays': 3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/selection': 3.16.0(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-stately/collections': 3.9.0(react@18.2.0) @@ -4531,12 +4521,12 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/numberfield@3.6.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/numberfield@3.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/live-announcer': 3.3.1 - '@react-aria/spinbutton': 3.5.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/spinbutton': 3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/textfield': 3.10.0(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-stately/numberfield': 3.5.0(react@18.2.0) @@ -4548,7 +4538,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - '@react-aria/overlays@3.15.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/overlays@3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) @@ -4600,13 +4590,13 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/select@3.11.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/select@3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/label': 3.6.0(react@18.2.0) '@react-aria/listbox': 3.10.0(react@18.2.0) - '@react-aria/menu': 3.10.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/menu': 3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/selection': 3.16.0(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) '@react-aria/visually-hidden': 3.8.2(react@18.2.0) @@ -4652,7 +4642,7 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/spinbutton@3.5.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/spinbutton@3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/live-announcer': 3.3.1 @@ -4676,10 +4666,10 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/table@3.10.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/table@3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@react-aria/focus': 3.13.0(react@18.2.0) - '@react-aria/grid': 3.8.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/grid': 3.8.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/live-announcer': 3.3.1 @@ -4711,9 +4701,9 @@ snapshots: '@swc/helpers': 0.5.1 react: 18.2.0 - '@react-aria/tag@3.1.0(react-dom@18.2.0)(react@18.2.0)': + '@react-aria/tag@3.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: - '@react-aria/gridlist': 3.5.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/gridlist': 3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/label': 3.6.0(react@18.2.0) @@ -5145,11 +5135,12 @@ snapshots: '@reduxjs/toolkit@1.9.7(react-redux@8.1.0)(react@18.2.0)': dependencies: immer: 9.0.21 - react: 18.2.0 - react-redux: 8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) redux: 4.2.1 redux-thunk: 2.4.2(redux@4.2.1) reselect: 4.1.8 + optionalDependencies: + react: 18.2.0 + react-redux: 8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) '@remix-run/router@1.6.3': {} @@ -5158,6 +5149,7 @@ snapshots: '@rollup/pluginutils': 5.0.2(rollup@3.25.1) estree-walker: 2.0.2 magic-string: 0.27.0 + optionalDependencies: rollup: 3.25.1 '@rollup/pluginutils@5.0.2(rollup@3.25.1)': @@ -5165,6 +5157,7 @@ snapshots: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 + optionalDependencies: rollup: 3.25.1 '@scure/base@1.1.1': {} @@ -5180,12 +5173,13 @@ snapshots: '@socket.io/component-emitter@3.1.0': {} - '@stacks/auth@6.13.0': + '@stacks/auth@7.0.2': dependencies: - '@stacks/common': 6.13.0 - '@stacks/encryption': 6.13.0 - '@stacks/network': 6.13.0 - '@stacks/profile': 6.13.0 + '@noble/secp256k1': 1.7.1 + '@stacks/common': 7.0.2 + '@stacks/encryption': 7.0.2 + '@stacks/network': 7.0.2 + '@stacks/profile': 7.0.2 cross-fetch: 3.1.8 jsontokens: 4.0.1 transitivePeerDependencies: @@ -5206,89 +5200,61 @@ snapshots: - supports-color - utf-8-validate - '@stacks/common@6.13.0': + '@stacks/common@6.16.0': dependencies: '@types/bn.js': 5.1.1 '@types/node': 18.16.19 - '@stacks/common@6.8.1': - dependencies: - '@types/bn.js': 5.1.1 - '@types/node': 18.16.19 + '@stacks/common@7.0.2': {} - '@stacks/connect-react@22.4.0(react-dom@18.2.0)(react@18.2.0)': + '@stacks/connect-react@22.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: - '@stacks/connect': 7.6.0 + '@stacks/connect': 7.9.0 jsontokens: 4.0.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) transitivePeerDependencies: - encoding - '@stacks/connect-ui@6.3.0': + '@stacks/connect-ui@6.5.0': dependencies: '@stencil/core': 2.22.3 - '@stacks/connect-ui@6.4.0': + '@stacks/connect@7.9.0': dependencies: - '@stencil/core': 2.22.3 - - '@stacks/connect@7.6.0': - dependencies: - '@stacks/auth': 6.13.0 - '@stacks/connect-ui': 6.3.0 - '@stacks/network': 6.8.1 - '@stacks/profile': 6.9.0 - '@stacks/transactions': 6.13.0 + '@stacks/auth': 7.0.2 + '@stacks/common': 7.0.2 + '@stacks/connect-ui': 6.5.0 + '@stacks/network': 7.0.2 + '@stacks/network-v6': '@stacks/network@6.17.0' + '@stacks/profile': 7.0.2 + '@stacks/transactions': 7.0.2 + '@stacks/transactions-v6': '@stacks/transactions@6.17.0' jsontokens: 4.0.1 transitivePeerDependencies: - encoding - '@stacks/connect@7.7.0': - dependencies: - '@stacks/auth': 6.13.0 - '@stacks/connect-ui': 6.4.0 - '@stacks/network': 6.8.1 - '@stacks/profile': 6.9.0 - '@stacks/transactions': 6.13.0 - jsontokens: 4.0.1 - transitivePeerDependencies: - - encoding - - '@stacks/encryption@6.13.0': + '@stacks/encryption@7.0.2': dependencies: '@noble/hashes': 1.1.5 '@noble/secp256k1': 1.7.1 '@scure/bip39': 1.1.0 - '@stacks/common': 6.13.0 - '@types/node': 18.16.19 + '@stacks/common': 7.0.2 base64-js: 1.5.1 bs58: 5.0.0 ripemd160-min: 0.0.6 varuint-bitcoin: 1.1.2 - '@stacks/encryption@6.13.1': + '@stacks/network@6.17.0': dependencies: - '@noble/hashes': 1.1.5 - '@noble/secp256k1': 1.7.1 - '@scure/bip39': 1.1.0 - '@stacks/common': 6.13.0 - '@types/node': 18.16.19 - base64-js: 1.5.1 - bs58: 5.0.0 - ripemd160-min: 0.0.6 - varuint-bitcoin: 1.1.2 - - '@stacks/network@6.13.0': - dependencies: - '@stacks/common': 6.13.0 + '@stacks/common': 6.16.0 cross-fetch: 3.1.8 transitivePeerDependencies: - encoding - '@stacks/network@6.8.1': + '@stacks/network@7.0.2': dependencies: - '@stacks/common': 6.8.1 + '@stacks/common': 7.0.2 cross-fetch: 3.1.8 transitivePeerDependencies: - encoding @@ -5297,37 +5263,26 @@ snapshots: dependencies: prettier: 2.5.1 - '@stacks/profile@6.13.0': + '@stacks/profile@7.0.2': dependencies: - '@stacks/common': 6.13.0 - '@stacks/network': 6.13.0 - '@stacks/transactions': 6.13.0 + '@stacks/common': 7.0.2 + '@stacks/network': 7.0.2 + '@stacks/transactions': 7.0.2 jsontokens: 4.0.1 schema-inspector: 2.0.3 zone-file: 2.0.0-beta.3 transitivePeerDependencies: - encoding - '@stacks/profile@6.9.0': - dependencies: - '@stacks/common': 6.8.1 - '@stacks/network': 6.8.1 - '@stacks/transactions': 6.13.0 - jsontokens: 4.0.1 - schema-inspector: 2.0.3 - zone-file: 2.0.0-beta.3 - transitivePeerDependencies: - - encoding - - '@stacks/stacking@6.13.2': + '@stacks/stacking@7.0.2': dependencies: '@noble/hashes': 1.1.5 '@scure/base': 1.1.1 - '@stacks/common': 6.13.0 - '@stacks/encryption': 6.13.1 - '@stacks/network': 6.13.0 + '@stacks/common': 7.0.2 + '@stacks/encryption': 7.0.2 + '@stacks/network': 7.0.2 '@stacks/stacks-blockchain-api-types': 0.61.0 - '@stacks/transactions': 6.13.1 + '@stacks/transactions': 7.0.2 bs58: 5.0.0 transitivePeerDependencies: - encoding @@ -5336,29 +5291,29 @@ snapshots: '@stacks/stacks-blockchain-api-types@7.3.2': {} - '@stacks/transactions@6.13.0': + '@stacks/transactions@6.17.0': dependencies: '@noble/hashes': 1.1.5 '@noble/secp256k1': 1.7.1 - '@stacks/common': 6.13.0 - '@stacks/network': 6.13.0 + '@stacks/common': 6.16.0 + '@stacks/network': 6.17.0 c32check: 2.0.0 lodash.clonedeep: 4.5.0 transitivePeerDependencies: - encoding - '@stacks/transactions@6.13.1': + '@stacks/transactions@7.0.2': dependencies: '@noble/hashes': 1.1.5 '@noble/secp256k1': 1.7.1 - '@stacks/common': 6.13.0 - '@stacks/network': 6.13.0 + '@stacks/common': 7.0.2 + '@stacks/network': 7.0.2 c32check: 2.0.0 lodash.clonedeep: 4.5.0 transitivePeerDependencies: - encoding - '@stacks/ui-core@7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1)(react@18.2.0)': + '@stacks/ui-core@7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(react@18.2.0)': dependencies: '@emotion/core': 11.0.0 '@emotion/react': 11.11.1(@types/react@18.2.13)(react@18.2.0) @@ -5382,29 +5337,29 @@ snapshots: type-fest: 0.21.3 typescript: 4.9.5 - '@stacks/ui@7.10.0(@emotion/core@11.0.0)(@emotion/react@11.11.1)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0)': + '@stacks/ui@7.10.0(@emotion/core@11.0.0)(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@emotion/core': 11.0.0 '@emotion/react': 11.11.1(@types/react@18.2.13)(react@18.2.0) - '@reach/alert': 0.13.2(react-dom@18.2.0)(react@18.2.0) - '@reach/auto-id': 0.13.2(react-dom@18.2.0)(react@18.2.0) - '@reach/rect': 0.13.2(react-dom@18.2.0)(react@18.2.0) + '@reach/alert': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@reach/auto-id': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@reach/rect': 0.13.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-spectrum/utils': 3.10.0(react@18.2.0) - '@stacks/ui-core': 7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1)(react@18.2.0) + '@stacks/ui-core': 7.3.0(@emotion/core@11.0.0)(@emotion/react@11.11.1(@types/react@18.2.13)(react@18.2.0))(react@18.2.0) '@stacks/ui-theme': 7.5.0 '@stacks/ui-utils': 7.5.0 '@styled-system/should-forward-prop': 5.1.5 '@styled-system/theme-get': 5.1.2 - '@tippyjs/react': 4.2.6(react-dom@18.2.0)(react@18.2.0) + '@tippyjs/react': 4.2.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0) color: 3.1.3 prism-react-renderer: 1.3.5(react@18.2.0) prismjs: 1.29.0 react: 18.2.0 - react-aria: 3.26.0(react-dom@18.2.0)(react@18.2.0) + react-aria: 3.26.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react-dom: 18.2.0(react@18.2.0) - react-hotkeys-hook: 2.4.1(react-dom@18.2.0)(react@18.2.0) - react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) - spinners-react: spinners-react-peer-deps-fix@1.0.5(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0) + react-hotkeys-hook: 2.4.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react-transition-group: 4.4.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + spinners-react: spinners-react-peer-deps-fix@1.0.5(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) type-fest: 0.21.3 use-events: 1.4.2(react@18.2.0) use-onclickoutside: use-onclickoutside-peer-deps@0.3.1(@types/react@18.2.13)(react@18.2.0) @@ -5489,14 +5444,15 @@ snapshots: '@tanstack/query-core@4.36.1': {} - '@tanstack/react-query@4.36.1(react-dom@18.2.0)(react@18.2.0)': + '@tanstack/react-query@4.36.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@tanstack/query-core': 4.36.1 react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0) + optionalDependencies: + react-dom: 18.2.0(react@18.2.0) - '@tippyjs/react@4.2.6(react-dom@18.2.0)(react@18.2.0)': + '@tippyjs/react@4.2.6(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -5508,10 +5464,11 @@ snapshots: '@babel/parser': 7.22.6 '@babel/traverse': 7.17.3 '@babel/types': 7.17.0 - '@vue/compiler-sfc': 3.3.4 javascript-natural-sort: 0.7.1 lodash: 4.17.21 prettier: 2.8.8 + optionalDependencies: + '@vue/compiler-sfc': 3.3.4 transitivePeerDependencies: - supports-color @@ -5605,7 +5562,7 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.0 - '@typescript-eslint/eslint-plugin@5.55.0(@typescript-eslint/parser@5.55.0)(eslint@8.43.0)(typescript@5.0.3)': + '@typescript-eslint/eslint-plugin@5.55.0(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint@8.43.0)(typescript@5.0.3)': dependencies: '@eslint-community/regexpp': 4.5.1 '@typescript-eslint/parser': 5.55.0(eslint@8.43.0)(typescript@5.0.3) @@ -5619,6 +5576,7 @@ snapshots: natural-compare-lite: 1.4.0 semver: 7.5.3 tsutils: 3.21.0(typescript@5.0.3) + optionalDependencies: typescript: 5.0.3 transitivePeerDependencies: - supports-color @@ -5630,6 +5588,7 @@ snapshots: '@typescript-eslint/typescript-estree': 5.55.0(typescript@5.0.3) debug: 4.3.4 eslint: 8.43.0 + optionalDependencies: typescript: 5.0.3 transitivePeerDependencies: - supports-color @@ -5646,6 +5605,7 @@ snapshots: debug: 4.3.4 eslint: 8.43.0 tsutils: 3.21.0(typescript@5.0.3) + optionalDependencies: typescript: 5.0.3 transitivePeerDependencies: - supports-color @@ -5661,6 +5621,7 @@ snapshots: is-glob: 4.0.3 semver: 7.5.3 tsutils: 3.21.0(typescript@5.0.3) + optionalDependencies: typescript: 5.0.3 transitivePeerDependencies: - supports-color @@ -5685,7 +5646,7 @@ snapshots: '@typescript-eslint/types': 5.55.0 eslint-visitor-keys: 3.4.1 - '@vitejs/plugin-react@4.0.0(vite@4.3.9)': + '@vitejs/plugin-react@4.0.0(vite@4.3.9(@types/node@20.3.1))': dependencies: '@babel/core': 7.22.5 '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.5) @@ -6370,18 +6331,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@5.55.0)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint-import-resolver-node@0.3.7)(eslint@8.43.0): dependencies: - '@typescript-eslint/parser': 5.55.0(eslint@8.43.0)(typescript@5.0.3) debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.55.0(eslint@8.43.0)(typescript@5.0.3) eslint: 8.43.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color - eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.55.0)(eslint@8.43.0): + eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint@8.43.0): dependencies: - '@typescript-eslint/parser': 5.55.0(eslint@8.43.0)(typescript@5.0.3) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 @@ -6389,7 +6350,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.43.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.55.0)(eslint-import-resolver-node@0.3.7)(eslint@8.43.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.55.0(eslint@8.43.0)(typescript@5.0.3))(eslint-import-resolver-node@0.3.7)(eslint@8.43.0) has: 1.0.3 is-core-module: 2.12.1 is-glob: 4.0.3 @@ -6398,6 +6359,8 @@ snapshots: resolve: 1.22.2 semver: 6.3.0 tsconfig-paths: 3.14.2 + optionalDependencies: + '@typescript-eslint/parser': 5.55.0(eslint@8.43.0)(typescript@5.0.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack @@ -7268,39 +7231,39 @@ snapshots: randombytes: 2.1.0 safe-buffer: 5.2.1 - react-aria@3.26.0(react-dom@18.2.0)(react@18.2.0): + react-aria@3.26.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@react-aria/breadcrumbs': 3.5.3(react@18.2.0) '@react-aria/button': 3.8.0(react@18.2.0) - '@react-aria/calendar': 3.4.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/calendar': 3.4.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/checkbox': 3.9.2(react@18.2.0) - '@react-aria/combobox': 3.6.2(react-dom@18.2.0)(react@18.2.0) - '@react-aria/datepicker': 3.5.0(react-dom@18.2.0)(react@18.2.0) - '@react-aria/dialog': 3.5.3(react-dom@18.2.0)(react@18.2.0) - '@react-aria/dnd': 3.3.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/combobox': 3.6.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-aria/datepicker': 3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-aria/dialog': 3.5.3(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-aria/dnd': 3.3.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/focus': 3.13.0(react@18.2.0) - '@react-aria/gridlist': 3.5.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/gridlist': 3.5.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/i18n': 3.8.0(react@18.2.0) '@react-aria/interactions': 3.16.0(react@18.2.0) '@react-aria/label': 3.6.0(react@18.2.0) '@react-aria/link': 3.5.2(react@18.2.0) '@react-aria/listbox': 3.10.0(react@18.2.0) - '@react-aria/menu': 3.10.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/menu': 3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/meter': 3.4.3(react@18.2.0) - '@react-aria/numberfield': 3.6.0(react-dom@18.2.0)(react@18.2.0) - '@react-aria/overlays': 3.15.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/numberfield': 3.6.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@react-aria/overlays': 3.15.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/progress': 3.4.3(react@18.2.0) '@react-aria/radio': 3.6.2(react@18.2.0) '@react-aria/searchfield': 3.5.3(react@18.2.0) - '@react-aria/select': 3.11.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/select': 3.11.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/selection': 3.16.0(react@18.2.0) '@react-aria/separator': 3.3.3(react@18.2.0) '@react-aria/slider': 3.5.0(react@18.2.0) '@react-aria/ssr': 3.7.0(react@18.2.0) '@react-aria/switch': 3.5.2(react@18.2.0) - '@react-aria/table': 3.10.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/table': 3.10.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/tabs': 3.6.1(react@18.2.0) - '@react-aria/tag': 3.1.0(react-dom@18.2.0)(react@18.2.0) + '@react-aria/tag': 3.1.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@react-aria/textfield': 3.10.0(react@18.2.0) '@react-aria/tooltip': 3.6.0(react@18.2.0) '@react-aria/utils': 3.18.0(react@18.2.0) @@ -7309,7 +7272,7 @@ snapshots: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-card-flip@1.2.0(react-dom@18.2.0)(react@18.2.0): + react-card-flip@1.2.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -7329,7 +7292,7 @@ snapshots: react-fast-compare@2.0.4: {} - react-hotkeys-hook@2.4.1(react-dom@18.2.0)(react@18.2.0): + react-hotkeys-hook@2.4.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: hotkeys-js: 3.8.1 react: 18.2.0 @@ -7343,24 +7306,25 @@ snapshots: react-is@18.2.0: {} - react-redux@8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): + react-redux@8.1.0(@reduxjs/toolkit@1.9.7)(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1): dependencies: '@babel/runtime': 7.22.6 - '@reduxjs/toolkit': 1.9.7(react-redux@8.1.0)(react@18.2.0) '@types/hoist-non-react-statics': 3.3.1 - '@types/react': 18.2.13 - '@types/react-dom': 18.2.6 '@types/use-sync-external-store': 0.0.3 hoist-non-react-statics: 3.3.2 react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) react-is: 18.2.0 - redux: 4.2.1 use-sync-external-store: 1.2.0(react@18.2.0) + optionalDependencies: + '@reduxjs/toolkit': 1.9.7(react-redux@8.1.0)(react@18.2.0) + '@types/react': 18.2.13 + '@types/react-dom': 18.2.6 + react-dom: 18.2.0(react@18.2.0) + redux: 4.2.1 react-refresh@0.14.0: {} - react-router-dom@6.13.0(react-dom@18.2.0)(react@18.2.0): + react-router-dom@6.13.0(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@remix-run/router': 1.6.3 react: 18.2.0 @@ -7372,7 +7336,7 @@ snapshots: '@remix-run/router': 1.6.3 react: 18.2.0 - react-transition-group@4.4.5(react-dom@18.2.0)(react@18.2.0): + react-transition-group@4.4.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@babel/runtime': 7.22.6 dom-helpers: 5.2.1 @@ -7539,7 +7503,7 @@ snapshots: source-map@0.5.7: {} - spinners-react-peer-deps-fix@1.0.5(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0)(react@18.2.0): + spinners-react-peer-deps-fix@1.0.5(@types/react-dom@18.2.6)(@types/react@18.2.13)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@types/react': 18.2.13 '@types/react-dom': 18.2.6 @@ -7694,7 +7658,7 @@ snapshots: typescript: 5.0.3 tsconfck@2.1.1(typescript@5.0.3): - dependencies: + optionalDependencies: typescript: 5.0.3 tsconfig-paths@3.14.2: @@ -7775,14 +7739,16 @@ snapshots: use-isomorphic-layout-effect@1.1.2(@types/react@18.2.13)(react@18.2.0): dependencies: - '@types/react': 18.2.13 react: 18.2.0 + optionalDependencies: + '@types/react': 18.2.13 use-latest@1.2.1(@types/react@18.2.13)(react@18.2.0): dependencies: - '@types/react': 18.2.13 react: 18.2.0 use-isomorphic-layout-effect: 1.1.2(@types/react@18.2.13)(react@18.2.0) + optionalDependencies: + '@types/react': 18.2.13 use-onclickoutside-peer-deps@0.3.1(@types/react@18.2.13)(react@18.2.0): dependencies: @@ -7837,7 +7803,7 @@ snapshots: - supports-color - terser - vite-plugin-node-stdlib-browser@0.2.1(node-stdlib-browser@1.2.0)(rollup@3.25.1)(vite@4.3.9): + vite-plugin-node-stdlib-browser@0.2.1(node-stdlib-browser@1.2.0)(rollup@3.25.1)(vite@4.3.9(@types/node@20.3.1)): dependencies: '@rollup/plugin-inject': 5.0.3(rollup@3.25.1) node-stdlib-browser: 1.2.0 @@ -7845,11 +7811,12 @@ snapshots: transitivePeerDependencies: - rollup - vite-tsconfig-paths@4.2.0(typescript@5.0.3)(vite@4.3.9): + vite-tsconfig-paths@4.2.0(typescript@5.0.3)(vite@4.3.9(@types/node@20.3.1)): dependencies: debug: 4.3.4 globrex: 0.1.2 tsconfck: 2.1.1(typescript@5.0.3) + optionalDependencies: vite: 4.3.9(@types/node@20.3.1) transitivePeerDependencies: - supports-color @@ -7857,11 +7824,11 @@ snapshots: vite@4.3.9(@types/node@20.3.1): dependencies: - '@types/node': 20.3.1 esbuild: 0.17.19 postcss: 8.4.24 rollup: 3.25.1 optionalDependencies: + '@types/node': 20.3.1 fsevents: 2.3.2 vitest@0.32.4: diff --git a/src/components/add-network-form.tsx b/src/components/add-network-form.tsx index 7d0e9615..c30d61e9 100644 --- a/src/components/add-network-form.tsx +++ b/src/components/add-network-form.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom'; import { Configuration, InfoApi } from '@stacks/blockchain-api-client'; -import { ChainID } from '@stacks/transactions'; +import { ChainId } from '@stacks/network'; import { Box, Button, FormLabel, Input, Stack } from '@stacks/ui'; import { Field, FieldProps, Form, Formik, FormikErrors } from 'formik'; import { string } from 'yup'; @@ -20,11 +20,11 @@ const buildCustomNetworkUrl = (url: string) => { return `${hostname === 'localhost' ? 'http://' : 'https://'}${hostname}${port ? `:${port}` : ''}`; }; -const fetchCustomNetworkId: (url: string) => Promise = (url: string) => { +const fetchCustomNetworkId: (url: string) => Promise = (url: string) => { return new InfoApi(new Configuration({ basePath: url })) .getCoreApiInfo() .then(res => - Object.values(ChainID).includes(res.network_id) ? (res.network_id as ChainID) : undefined + Object.values(ChainId).includes(res.network_id) ? (res.network_id as ChainId) : undefined ) .catch(); }; diff --git a/src/components/blockchain-api-client-provider.tsx b/src/components/blockchain-api-client-provider.tsx index b511261c..24e8f5fc 100644 --- a/src/components/blockchain-api-client-provider.tsx +++ b/src/components/blockchain-api-client-provider.tsx @@ -45,7 +45,7 @@ interface Props { } export function BlockchainApiClientProvider({ children }: Props) { const { network } = useStacksNetwork(); - const config = new Configuration({ basePath: network.coreApiUrl }); + const config = new Configuration({ basePath: network.client.baseUrl }); return ( { if (senderAddress) { const [contractAddress, contractName] = poxContractId.split('.'); - return callReadOnlyFunction({ + return fetchCallReadOnlyFunction({ contractAddress, contractName, functionName: 'get-allowance-contract-callers', diff --git a/src/constants/network.ts b/src/constants/network.ts index a6e9dfaf..529120fd 100644 --- a/src/constants/network.ts +++ b/src/constants/network.ts @@ -1,5 +1,5 @@ import { StacksNetworkName } from '@stacks/network'; -import { ChainID } from '@stacks/transactions'; +import { ChainId } from '@stacks/network'; import { DEFAULT_DEVNET_SERVER, @@ -7,9 +7,9 @@ import { DEFAULT_TESTNET_SERVER, } from '../constants'; -export const NetworkIdModeMap: { [key in ChainID]: StacksNetworkName } = { - [ChainID.Mainnet]: 'mainnet', - [ChainID.Testnet]: 'testnet', +export const NetworkIdModeMap: { [key in ChainId]: StacksNetworkName } = { + [ChainId.Mainnet]: 'mainnet', + [ChainId.Testnet]: 'testnet', }; export const NetworkModeUrlMap: Record = { diff --git a/src/context/global-context.tsx b/src/context/global-context.tsx index f793b785..5326de79 100644 --- a/src/context/global-context.tsx +++ b/src/context/global-context.tsx @@ -2,7 +2,7 @@ import { ReactNode, createContext, useMemo, useState } from 'react'; import { useCookies } from 'react-cookie'; import { StacksNetworkName } from '@stacks/network'; -import { ChainID } from '@stacks/transactions'; +import { ChainId } from '@stacks/network'; import cookie from 'cookie'; import { Navigate } from '@components/navigate'; @@ -27,7 +27,7 @@ export const GlobalContext = createContext({ activeNetwork: { label: 'stacks.co', url: NetworkModeUrlMap.mainnet, - networkId: ChainID.Mainnet, + networkId: ChainId.Mainnet, mode: 'mainnet', }, activeNetworkKey: NetworkModeUrlMap.mainnet, @@ -59,26 +59,26 @@ export const AppContextProvider = ({ [apiUrls.mainnet]: { label: 'hiro.so', url: apiUrls.mainnet, - networkId: ChainID.Mainnet, + networkId: ChainId.Mainnet, mode: 'mainnet', }, [apiUrls.testnet]: { label: 'hiro.so', url: apiUrls.testnet, - networkId: ChainID.Testnet, + networkId: ChainId.Testnet, mode: 'testnet', }, [DEFAULT_DEVNET_SERVER]: { label: 'devnet', url: DEFAULT_DEVNET_SERVER, - networkId: ChainID.Testnet, + networkId: ChainId.Testnet, mode: 'testnet', isCustomNetwork: true, }, [NAKA_TESTNET_SERVER]: { label: 'Nakamoto Testnet', url: NAKA_TESTNET_SERVER, - networkId: ChainID.Testnet, + networkId: ChainId.Testnet, mode: 'testnet', isCustomNetwork: true, }, diff --git a/src/hooks/use-stacks-network.ts b/src/hooks/use-stacks-network.ts index b32b1f69..50358073 100644 --- a/src/hooks/use-stacks-network.ts +++ b/src/hooks/use-stacks-network.ts @@ -1,36 +1,43 @@ import { - StacksDevnet, - StacksMainnet, - StacksMocknet, + STACKS_DEVNET, + STACKS_MAINNET, + STACKS_MOCKNET, + STACKS_TESTNET, + StacksNetwork, StacksNetworkName, - StacksTestnet, + networkFrom, } from '@stacks/network'; import { NetworkInstance } from 'src/pages/stacking/start-pooled-stacking/types-preset-pools'; import { getNetworkInstance } from 'src/pages/stacking/start-pooled-stacking/utils-preset-pools'; import { whenStacksNetworkMode } from 'src/types/network'; -import { fetchWithApiKey } from '@utils/fetch-with-api-keys'; +import { fetchFn } from '@components/stacking-client-provider/fetch-fn'; import { useGlobalContext } from '../context/use-app-context'; export type StacksNetworkContext = ReturnType; +function setFetchFn(network: StacksNetwork) { + network.client.fetch = fetchFn; + return network; +} + export const useStacksNetwork = (): { - network: StacksTestnet | StacksMainnet; + network: StacksNetwork; networkName: StacksNetworkName; networkInstance: NetworkInstance; networkLabel: string; } => { const selectedNetwork = useGlobalContext().activeNetwork; - const apiServer = selectedNetwork.url; + const networkMode = selectedNetwork.mode; - const Network = whenStacksNetworkMode(networkMode)({ - mainnet: StacksMainnet, - testnet: StacksTestnet, - devnet: StacksDevnet, - mocknet: StacksMocknet, + const network = whenStacksNetworkMode(networkMode)({ + mainnet: networkFrom(setFetchFn(STACKS_MAINNET)), + testnet: networkFrom(setFetchFn(STACKS_TESTNET)), + devnet: networkFrom(setFetchFn(STACKS_DEVNET)), + mocknet: networkFrom(setFetchFn(STACKS_MOCKNET)), }); - const network = new Network({ url: apiServer, fetchFn: fetchWithApiKey }); + const networkInstance = getNetworkInstance(network); return { network, diff --git a/src/pages/settings/network/network-items.tsx b/src/pages/settings/network/network-items.tsx index b211f956..df926d98 100644 --- a/src/pages/settings/network/network-items.tsx +++ b/src/pages/settings/network/network-items.tsx @@ -7,7 +7,7 @@ import { useNavigate as useNavigateRouterDom } from 'react-router-dom'; import { Configuration, InfoApi } from '@stacks/blockchain-api-client'; import { CoreNodeInfoResponse } from '@stacks/blockchain-api-client/src/generated/models'; import { StacksNetworkName } from '@stacks/network'; -import { ChainID } from '@stacks/transactions'; +import { ChainId } from '@stacks/network'; import { Box, Flex, FlexProps, IconButton, Spinner, Stack, Tooltip, color } from '@stacks/ui'; import { BoxProps } from '@stacks/ui-core'; import { useQuery } from '@tanstack/react-query'; @@ -85,9 +85,9 @@ const Item = ({ item, isActive, isDisabled, onClick, isCustom, ...rest }: ItemPr const isTestnet = item.url === testnet; const isDefault = isMainnet || isTestnet; - let itemNetworkId: ChainID.Mainnet | ChainID.Testnet = isMainnet - ? ChainID.Mainnet - : ChainID.Testnet; + let itemNetworkId: ChainId.Mainnet | ChainId.Testnet = isMainnet + ? ChainId.Mainnet + : ChainId.Testnet; const doNotFetch = isDisabled || !item.url || isDefault; @@ -107,8 +107,8 @@ const Item = ({ item, isActive, isDisabled, onClick, isCustom, ...rest }: ItemPr } const itemNetworkMode: StacksNetworkName = whenStacksChainId(itemNetworkId)({ - [ChainID.Mainnet]: 'mainnet', - [ChainID.Testnet]: 'testnet', + [ChainId.Mainnet]: 'mainnet', + [ChainId.Testnet]: 'testnet', }); return ( diff --git a/src/pages/stacking/components/stacking-for-user-form-container.tsx b/src/pages/stacking/components/stacking-for-user-form-container.tsx index c19efa9c..b66b536d 100644 --- a/src/pages/stacking/components/stacking-for-user-form-container.tsx +++ b/src/pages/stacking/components/stacking-for-user-form-container.tsx @@ -19,7 +19,7 @@ export function StackingForUserFormContainer({ }) { const { setFieldValue } = useFormikContext(); const { network } = useStacksNetwork(); - const client = new StackingClient(address, network); + const client = new StackingClient({ address, network }); const getAccountExtendedBalancesQuery = useGetAccountExtendedBalancesWithClientQuery(client); const getDelegationStatusQuery = useDelegationStatusForUserQuery({ client, diff --git a/src/pages/stacking/direct-stacking-info/get-has-pending-direct-stacking.ts b/src/pages/stacking/direct-stacking-info/get-has-pending-direct-stacking.ts index d6a34d2a..c8ab4361 100644 --- a/src/pages/stacking/direct-stacking-info/get-has-pending-direct-stacking.ts +++ b/src/pages/stacking/direct-stacking-info/get-has-pending-direct-stacking.ts @@ -46,13 +46,13 @@ function getDirectStackingStatusFromTransaction(network: StacksNetworkName) { if (!startBurnHeightCV || startBurnHeightCV.type !== ClarityType.UInt) { throw new Error('Expected `startBurnHeightCV` to be of type `UInt`.'); } - const startBurnHeight: bigint = startBurnHeightCV.value; + const startBurnHeight = BigInt(startBurnHeightCV.value); // Amount if (!amountMicroStxCV || amountMicroStxCV.type !== ClarityType.UInt) { throw new Error('Expected `amountMicroStxCV` to be of type `UInt`.'); } - const amountMicroStx: bigint = amountMicroStxCV.value; + const amountMicroStx = BigInt(amountMicroStxCV.value); // PoX address const poxAddress = poxAddressToBtcAddress(poxAddressCV, network); @@ -61,7 +61,7 @@ function getDirectStackingStatusFromTransaction(network: StacksNetworkName) { if (!lockPeriodCV || lockPeriodCV.type !== ClarityType.UInt) { throw new Error('Expected `lockPeriodCV` to be of type `UInt`.'); } - const lockPeriod = lockPeriodCV.value; + const lockPeriod = BigInt(lockPeriodCV.value); return { transactionId: transaction.tx_id, diff --git a/src/pages/stacking/direct-stacking-info/utils-pending-txs.ts b/src/pages/stacking/direct-stacking-info/utils-pending-txs.ts index 528be7dd..eb31cbea 100644 --- a/src/pages/stacking/direct-stacking-info/utils-pending-txs.ts +++ b/src/pages/stacking/direct-stacking-info/utils-pending-txs.ts @@ -132,5 +132,5 @@ export function expectUintCV(valueCV: ClarityValue, argName: string) { if (!valueCV || valueCV.type !== ClarityType.UInt) { throw new Error(`Expected '${argName}' to be of type 'UInt'.`); } - return valueCV.value; + return BigInt(valueCV.value); } diff --git a/src/pages/stacking/pool-admin/delegate-stack-extend/components/delegate-stack-extend-info-card.tsx b/src/pages/stacking/pool-admin/delegate-stack-extend/components/delegate-stack-extend-info-card.tsx index add7b277..d71aa0e2 100644 --- a/src/pages/stacking/pool-admin/delegate-stack-extend/components/delegate-stack-extend-info-card.tsx +++ b/src/pages/stacking/pool-admin/delegate-stack-extend/components/delegate-stack-extend-info-card.tsx @@ -26,12 +26,12 @@ import { DelegateStackExtendFormValues } from '../types'; function StackerExtendInfo({ stacker }: { stacker: string }) { const { network } = useStacksNetwork(); - const client = new StackingClient(stacker, network); + const client = new StackingClient({ address: stacker, network }); const getAccountExtendedBalancesQuery = useGetAccountExtendedBalancesWithClientQuery(client); let amount: bigint | null = null; if (!getAccountExtendedBalancesQuery.isError && getAccountExtendedBalancesQuery.data?.stx) { - amount = intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked, false); + amount = intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked); } if (amount === null || amount === 0n) { return ( diff --git a/src/pages/stacking/pool-admin/delegate-stack-increase/components/delegate-stack-increase-info-card.tsx b/src/pages/stacking/pool-admin/delegate-stack-increase/components/delegate-stack-increase-info-card.tsx index 10e8d9d9..cda1053c 100644 --- a/src/pages/stacking/pool-admin/delegate-stack-increase/components/delegate-stack-increase-info-card.tsx +++ b/src/pages/stacking/pool-admin/delegate-stack-increase/components/delegate-stack-increase-info-card.tsx @@ -42,12 +42,12 @@ function StackerIncreaseInfo({ stacker, amount }: { stacker: string; amount: str export function StackerDuration({ stacker }: { stacker: string }) { const { network } = useStacksNetwork(); - const client = new StackingClient(stacker, network); + const client = new StackingClient({ address: stacker, network }); const getAccountExtendedBalancesQuery = useGetAccountExtendedBalancesWithClientQuery(client); let lockedAmount: bigint | null = null; if (!getAccountExtendedBalancesQuery.isError && getAccountExtendedBalancesQuery.data?.stx) { - lockedAmount = intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked, false); + lockedAmount = intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked); } if (lockedAmount === null || lockedAmount === 0n) { return ( @@ -62,14 +62,13 @@ export function StackerDuration({ stacker }: { stacker: string }) { function IncreaseByValue({ stacker, amount }: { stacker: string; amount: IntegerType }) { const { network } = useStacksNetwork(); - const client = new StackingClient(stacker, network); + const client = new StackingClient({ address: stacker, network }); const getAccountExtendedBalancesQuery = useGetAccountExtendedBalancesWithClientQuery(client); if (getAccountExtendedBalancesQuery.isError || !getAccountExtendedBalancesQuery.data) { return 0 STX; } const increaseBy = - intToBigInt(amount, false) * 1_000_000n - - intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked, false); + intToBigInt(amount) * 1_000_000n - intToBigInt(getAccountExtendedBalancesQuery.data.stx.locked); return {toHumanReadableStx(increaseBy > 0n ? increaseBy : 0n)}; } diff --git a/src/pages/stacking/pool-admin/delegate-stack-increase/utils.ts b/src/pages/stacking/pool-admin/delegate-stack-increase/utils.ts index 1b1bccf0..8505443e 100644 --- a/src/pages/stacking/pool-admin/delegate-stack-increase/utils.ts +++ b/src/pages/stacking/pool-admin/delegate-stack-increase/utils.ts @@ -64,11 +64,10 @@ export function createHandleSubmit({ }: CreateHandleSubmitArgs) { return async function handleSubmit(values: DelegateStackIncreaseFormValues) { if (values.amount === null) throw new Error('Expected a non-null amount to be submitted.'); - const stackerClient = new StackingClient(values.stacker, network); + const stackerClient = new StackingClient({ address: values.stacker, network }); const balances = await stackerClient.getAccountExtendedBalances(); const increaseBy = - intToBigInt(stxToMicroStx(values.amount).toString(), false) - - intToBigInt(balances.stx.locked, false); + intToBigInt(stxToMicroStx(values.amount).toString()) - intToBigInt(balances.stx.locked); // TODO: handle thrown errors const [stackingContract] = await Promise.all([client.getStackingContract()]); diff --git a/src/pages/stacking/pool-admin/delegate-stack-stx/delegate-stack-stx.tsx b/src/pages/stacking/pool-admin/delegate-stack-stx/delegate-stack-stx.tsx index a7bb5fbf..87059727 100644 --- a/src/pages/stacking/pool-admin/delegate-stack-stx/delegate-stack-stx.tsx +++ b/src/pages/stacking/pool-admin/delegate-stack-stx/delegate-stack-stx.tsx @@ -86,7 +86,7 @@ function DelegateStackStxLayout({ client }: DelegateStackStxLayoutProps) { } const validationSchema = createValidationSchema({ - availableBalanceUStx: intToBigInt(UI_IMPOSED_MAX_STACKING_AMOUNT_USTX.toString(), false), + availableBalanceUStx: intToBigInt(UI_IMPOSED_MAX_STACKING_AMOUNT_USTX.toString()), // TODO why is current burnchain block height undefined? currentBurnHt: getPoxInfoQuery.data.current_burnchain_block_height || 0, network: networkName, diff --git a/src/pages/stacking/pooled-stacking-info/components/content-active-pooling.tsx b/src/pages/stacking/pooled-stacking-info/components/content-active-pooling.tsx index dd11a011..737c1492 100644 --- a/src/pages/stacking/pooled-stacking-info/components/content-active-pooling.tsx +++ b/src/pages/stacking/pooled-stacking-info/components/content-active-pooling.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { intToBigInt } from '@stacks/common'; -import { AccountExtendedBalances, StackerInfo } from '@stacks/stacking'; +import { ExtendedAccountBalances, StackerInfo } from '@stacks/stacking'; import { Box, Button, Text, color } from '@stacks/ui'; import { DelegationInfoDetails } from 'src/types/stacking'; @@ -34,7 +34,7 @@ interface ActivePoolingContentProps { poolAddress: string; isContractCallExtensionPageOpen: boolean; stackerInfo: StackerInfo; - extendedStxBalance: AccountExtendedBalances['stx']; + extendedStxBalance: ExtendedAccountBalances['stx']; handleStopPoolingClick: () => void; } export function ActivePoolingContent({ @@ -86,7 +86,7 @@ export function ActivePoolingContent({ /> - {toHumanReadableStx(intToBigInt(extendedStxBalance.locked, false))} + {toHumanReadableStx(intToBigInt(extendedStxBalance.locked))} )} diff --git a/src/pages/stacking/pooled-stacking-info/components/content-revoked-while-stacking.tsx b/src/pages/stacking/pooled-stacking-info/components/content-revoked-while-stacking.tsx index 4881bbf6..73c5f4ba 100644 --- a/src/pages/stacking/pooled-stacking-info/components/content-revoked-while-stacking.tsx +++ b/src/pages/stacking/pooled-stacking-info/components/content-revoked-while-stacking.tsx @@ -1,5 +1,5 @@ import { intToBigInt } from '@stacks/common'; -import { AccountExtendedBalances } from '@stacks/stacking'; +import { ExtendedAccountBalances } from '@stacks/stacking'; import { Text, color } from '@stacks/ui'; import { IconInfoCircle } from '@tabler/icons-react'; @@ -20,7 +20,7 @@ import { toHumanReadableStx } from '@utils/unit-convert'; import { PercentageRow } from './percentage-row'; interface RevokedWhileStackingContentProps { - extendedStxBalances: AccountExtendedBalances['stx']; + extendedStxBalances: ExtendedAccountBalances['stx']; poolAddress: string; } export function RevokedWhileStackingContent({ @@ -38,7 +38,7 @@ export function RevokedWhileStackingContent({ mt="extra-tight" my="extra-loose" > - {toHumanReadableStx(intToBigInt(extendedStxBalances.locked, false))} + {toHumanReadableStx(intToBigInt(extendedStxBalances.locked))}
diff --git a/src/pages/stacking/pooled-stacking-info/components/percentage-row.tsx b/src/pages/stacking/pooled-stacking-info/components/percentage-row.tsx index aca98215..ebb098ad 100644 --- a/src/pages/stacking/pooled-stacking-info/components/percentage-row.tsx +++ b/src/pages/stacking/pooled-stacking-info/components/percentage-row.tsx @@ -1,4 +1,4 @@ -import { AccountExtendedBalances } from '@stacks/stacking'; +import { ExtendedAccountBalances } from '@stacks/stacking'; import { InfoCardLabel as Label, @@ -8,7 +8,7 @@ import { import { useGetCoreInfoQuery } from '@components/stacking-client-provider/stacking-client-provider'; interface PercentageRowProps { - extendedStxBalances: AccountExtendedBalances['stx']; + extendedStxBalances: ExtendedAccountBalances['stx']; } export function PercentageRow({ extendedStxBalances }: PercentageRowProps) { const getCoreInfoQuery = useGetCoreInfoQuery(); diff --git a/src/pages/stacking/pooled-stacking-info/get-delegation-status.ts b/src/pages/stacking/pooled-stacking-info/get-delegation-status.ts index 4152c11b..b3e2e6d1 100644 --- a/src/pages/stacking/pooled-stacking-info/get-delegation-status.ts +++ b/src/pages/stacking/pooled-stacking-info/get-delegation-status.ts @@ -57,7 +57,7 @@ function getDelegationStatusFromTransaction(network: StacksNetwork) { if (!amountMicroStxCV || amountMicroStxCV.type !== ClarityType.UInt) { throw new Error('Expected `amount-ustx` to be defined.'); } - const amountMicroStx: bigint = amountMicroStxCV.value; + const amountMicroStx = BigInt(amountMicroStxCV.value); let untilBurnHeight: undefined | number = undefined; @@ -85,7 +85,7 @@ function getDelegationStatusFromTransaction(network: StacksNetwork) { const extractPoxAddressFromClarityValue2 = (poxAddrCV: ClarityValue) => { const { version, hashBytes } = extractPoxAddressFromClarityValue(poxAddrCV); - return { version: new Uint8Array([version]), hashbytes: hashBytes }; + return { version, hashbytes: hashBytes }; }; const poxAddress = diff --git a/src/pages/stacking/self-service-extend/components/extend-for-current-user.tsx b/src/pages/stacking/self-service-extend/components/extend-for-current-user.tsx index a173d598..1dd46fbe 100644 --- a/src/pages/stacking/self-service-extend/components/extend-for-current-user.tsx +++ b/src/pages/stacking/self-service-extend/components/extend-for-current-user.tsx @@ -31,7 +31,7 @@ export function ExtendForCurrentUser({ setShowExtendForOtherUser, }: Props) { const { network } = useStacksNetwork(); - const client = new StackingClient(address, network); + const client = new StackingClient({ address, network }); const getDelegationStatusQuery = useDelegationStatusForUserQuery({ client, address, network }); if (getDelegationStatusQuery.isError || !getDelegationStatusQuery.data) { diff --git a/src/pages/stacking/self-service-extend/components/extend-for-other-user.tsx b/src/pages/stacking/self-service-extend/components/extend-for-other-user.tsx index 6d576eac..5d99d9e3 100644 --- a/src/pages/stacking/self-service-extend/components/extend-for-other-user.tsx +++ b/src/pages/stacking/self-service-extend/components/extend-for-other-user.tsx @@ -28,7 +28,7 @@ export function ExtendForOtherUser({ onClose, isContractCallExtensionPageOpen }: const [field, meta] = useField('stacker'); const { network } = useStacksNetwork(); const address = field.value; - const client = new StackingClient(address, network); + const client = new StackingClient({ address, network }); const getStatusQuery = useGetStatusWithClientQuery(client); const getPoxInfoQuery = useGetPoxInfoQuery(); const getDelegationStatusQuery = useDelegationStatusForUserQuery({ client, address, network }); diff --git a/src/pages/stacking/self-service-extend/components/stacker-details-rows-for-extend.tsx b/src/pages/stacking/self-service-extend/components/stacker-details-rows-for-extend.tsx index abcdbbf9..0052a06e 100644 --- a/src/pages/stacking/self-service-extend/components/stacker-details-rows-for-extend.tsx +++ b/src/pages/stacking/self-service-extend/components/stacker-details-rows-for-extend.tsx @@ -42,7 +42,10 @@ export function StackerDetailsRowsForUserExtend({ const canExtend = isSelfServicePool(poolStxAddress); const requiredPoxAddress = delegationStatus.details.pox_address - ? formatPoxAddressToNetwork(network, delegationStatus.details.pox_address) + ? formatPoxAddressToNetwork(network, { + version: new Uint8Array([delegationStatus.details.pox_address.version]), + hashbytes: delegationStatus.details.pox_address.hashbytes, + }) : undefined; const stackedPoxAddress = stackerInfoDetails?.pox_address ? formatPoxAddressToNetwork(network, stackerInfoDetails.pox_address) diff --git a/src/pages/stacking/stack-increase/components/stack-increase-layout.tsx b/src/pages/stacking/stack-increase/components/stack-increase-layout.tsx index 4c103439..e946f287 100644 --- a/src/pages/stacking/stack-increase/components/stack-increase-layout.tsx +++ b/src/pages/stacking/stack-increase/components/stack-increase-layout.tsx @@ -1,6 +1,6 @@ import { useNavigate } from 'react-router-dom'; -import { AccountExtendedBalances } from '@stacks/stacking'; +import { ExtendedAccountBalances } from '@stacks/stacking'; import { Box, Button, Flex, Text } from '@stacks/ui'; import { IconLock } from '@tabler/icons-react'; import { useFormikContext } from 'formik'; @@ -26,7 +26,7 @@ import { Amount } from './choose-amount'; interface StackIncreaseLayoutProps { title: string; - extendedStxBalances: AccountExtendedBalances['stx']; + extendedStxBalances: ExtendedAccountBalances['stx']; pendingStackIncrease: StackIncreaseInfo | undefined | null; isContractCallExtensionPageOpen: boolean; } diff --git a/src/pages/stacking/stack-increase/utils.ts b/src/pages/stacking/stack-increase/utils.ts index 94a11df5..804f76c6 100644 --- a/src/pages/stacking/stack-increase/utils.ts +++ b/src/pages/stacking/stack-increase/utils.ts @@ -2,7 +2,7 @@ import { NavigateFunction } from 'react-router-dom'; import { ContractCallRegularOptions, showContractCall } from '@stacks/connect'; import { - AccountExtendedBalances, + ExtendedAccountBalances, Pox4SignatureTopic, StackerInfo, StackingClient, @@ -194,7 +194,7 @@ export function createHandleSubmit({ } export function getAvailableAmountUstx( - extendedStxBalances: AccountExtendedBalances['stx'], + extendedStxBalances: ExtendedAccountBalances['stx'], stackIncreaseInfo: StackIncreaseInfo | undefined | null ) { return new BigNumber(extendedStxBalances.balance.toString()) diff --git a/src/pages/stacking/start-direct-stacking/components/choose-amount.tsx b/src/pages/stacking/start-direct-stacking/components/choose-amount.tsx index 5ac52301..c88e84ca 100644 --- a/src/pages/stacking/start-direct-stacking/components/choose-amount.tsx +++ b/src/pages/stacking/start-direct-stacking/components/choose-amount.tsx @@ -53,7 +53,7 @@ export function Amount() { const showStackingWarningCard = ustxAmount.isGreaterThanOrEqualTo(minimumAmountUstx); let maxAmountUstx = new BigNumberFloorRound( - new BigNumber(availableBalance.toString()).minus(STACKING_CONTRACT_CALL_TX_BYTES).toString() + new BigNumber(availableBalance).minus(STACKING_CONTRACT_CALL_TX_BYTES).toString() ).decimalPlaces(0); if (maxAmountUstx.isNegative()) { maxAmountUstx = new BigNumber(0); diff --git a/src/pages/stacking/start-direct-stacking/start-direct-stacking.tsx b/src/pages/stacking/start-direct-stacking/start-direct-stacking.tsx index ed5b57e4..ad6d75a7 100644 --- a/src/pages/stacking/start-direct-stacking/start-direct-stacking.tsx +++ b/src/pages/stacking/start-direct-stacking/start-direct-stacking.tsx @@ -94,7 +94,7 @@ function StartDirectStackingLayout({ client }: StartDirectStackingLayoutProps) { const validationSchema = createValidationSchema({ minimumAmountUStx: BigInt(getPoxInfoQuery.data.min_amount_ustx), transactionFeeUStx, - availableBalanceUStx: intToBigInt(getAccountExtendedBalancesQuery.data.stx.balance, false), + availableBalanceUStx: intToBigInt(getAccountExtendedBalancesQuery.data.stx.balance), network, rewardCycleId: getPoxInfoQuery.data.current_cycle.id, }); diff --git a/src/pages/stacking/start-liquid-stacking/components/choose-stacking-amount.tsx b/src/pages/stacking/start-liquid-stacking/components/choose-stacking-amount.tsx index 40e8252f..1a913f1b 100644 --- a/src/pages/stacking/start-liquid-stacking/components/choose-stacking-amount.tsx +++ b/src/pages/stacking/start-liquid-stacking/components/choose-stacking-amount.tsx @@ -14,10 +14,10 @@ export function ChooseStackingAmount() { const [field, meta, helpers] = useField('amount'); const queryGetAccountExtendedBalances = useGetAccountExtendedBalancesQuery(); const totalAvailableBalance = queryGetAccountExtendedBalances.data?.stx.balance - ? intToBigInt(queryGetAccountExtendedBalances.data.stx.balance, false) + ? intToBigInt(queryGetAccountExtendedBalances.data.stx.balance) : undefined; const lockedBalance = queryGetAccountExtendedBalances.data?.stx.locked - ? intToBigInt(queryGetAccountExtendedBalances.data.stx.locked, false) + ? intToBigInt(queryGetAccountExtendedBalances.data.stx.locked) : undefined; const availableForStacking = totalAvailableBalance && lockedBalance ? totalAvailableBalance - lockedBalance : undefined; diff --git a/src/pages/stacking/start-liquid-stacking/utils-liquid-stacking-stx.ts b/src/pages/stacking/start-liquid-stacking/utils-liquid-stacking-stx.ts index a31032dc..440829e5 100644 --- a/src/pages/stacking/start-liquid-stacking/utils-liquid-stacking-stx.ts +++ b/src/pages/stacking/start-liquid-stacking/utils-liquid-stacking-stx.ts @@ -3,13 +3,7 @@ import { NavigateFunction } from 'react-router-dom'; import { ContractCallRegularOptions, openContractCall } from '@stacks/connect'; import { StacksNetwork } from '@stacks/network'; -import { - FungibleConditionCode, - contractPrincipalCV, - makeStandardSTXPostCondition, - noneCV, - uintCV, -} from '@stacks/transactions'; +import { StxPostCondition, contractPrincipalCV, noneCV, uintCV } from '@stacks/transactions'; import * as yup from 'yup'; import { UI_IMPOSED_MAX_STACKING_AMOUNT_USTX } from '@constants/app'; @@ -79,16 +73,23 @@ function getOptions(values: EditingFormValues, network: StacksNetwork): Contract : protocol.liquidContract === LiquidContractName.Lisa ? { functionArgs: [uintCV(stxAmount)], functionName: 'request-mint' } : { functionArgs: [], functionName: 'deposit' }; - const postConditions = [ - makeStandardSTXPostCondition(stxAddress, FungibleConditionCode.LessEqual, stxAmount), + + const postConditions: StxPostCondition[] = [ + { + type: 'stx-postcondition', + address: stxAddress, + condition: 'lte', + amount: stxAmount, + }, ]; + return { contractAddress, contractName, functionName, functionArgs, - postConditions, network, + postConditions, }; } interface CreateHandleSubmitArgs { diff --git a/src/pages/stacking/start-liquid-stacking/utils-preset-protocols.ts b/src/pages/stacking/start-liquid-stacking/utils-preset-protocols.ts index e1e7acdb..df1fdace 100644 --- a/src/pages/stacking/start-liquid-stacking/utils-preset-protocols.ts +++ b/src/pages/stacking/start-liquid-stacking/utils-preset-protocols.ts @@ -1,5 +1,4 @@ -import { ChainID } from '@stacks/common'; -import { StacksNetwork } from '@stacks/network'; +import { ChainId, StacksNetwork } from '@stacks/network'; import { DEFAULT_DEVNET_SERVER } from 'src/constants'; import { NetworkInstance } from 'src/pages/stacking/start-pooled-stacking/types-preset-pools'; @@ -11,9 +10,9 @@ import { } from './types-preset-protocols'; export function getNetworkInstance(network: StacksNetwork) { - if (network.chainId === ChainID.Mainnet) { + if (network.chainId === ChainId.Mainnet) { return NetworkInstance.mainnet; - } else if (network.coreApiUrl === DEFAULT_DEVNET_SERVER) { + } else if (network.client.baseUrl === DEFAULT_DEVNET_SERVER) { return NetworkInstance.devnet; } else { return NetworkInstance.testnet; diff --git a/src/pages/stacking/start-pooled-stacking/components/choose-pooling-amount.tsx b/src/pages/stacking/start-pooled-stacking/components/choose-pooling-amount.tsx index 29bd33b5..f7fc5f8a 100644 --- a/src/pages/stacking/start-pooled-stacking/components/choose-pooling-amount.tsx +++ b/src/pages/stacking/start-pooled-stacking/components/choose-pooling-amount.tsx @@ -14,10 +14,10 @@ export function ChoosePoolingAmount() { const [field, meta, helpers] = useField('amount'); const queryGetAccountExtendedBalances = useGetAccountExtendedBalancesQuery(); const totalAvailableBalance = queryGetAccountExtendedBalances.data?.stx.balance - ? intToBigInt(queryGetAccountExtendedBalances.data.stx.balance, false) + ? intToBigInt(queryGetAccountExtendedBalances.data.stx.balance) : undefined; const lockedBalance = queryGetAccountExtendedBalances.data?.stx.locked - ? intToBigInt(queryGetAccountExtendedBalances.data.stx.locked, false) + ? intToBigInt(queryGetAccountExtendedBalances.data.stx.locked) : undefined; return ( diff --git a/src/pages/stacking/start-pooled-stacking/utils-delegate-stx.ts b/src/pages/stacking/start-pooled-stacking/utils-delegate-stx.ts index 1c7876ba..f63ec8a1 100644 --- a/src/pages/stacking/start-pooled-stacking/utils-delegate-stx.ts +++ b/src/pages/stacking/start-pooled-stacking/utils-delegate-stx.ts @@ -4,14 +4,12 @@ import { NavigateFunction } from 'react-router-dom'; import { ContractCallRegularOptions, showContractCall } from '@stacks/connect'; import { StacksNetwork, StacksNetworkName } from '@stacks/network'; import { PoxInfo, StackingClient, poxAddressToTuple } from '@stacks/stacking'; -import { ClarityValue, noneCV, someCV, uintCV } from '@stacks/transactions'; -import { principalCV } from '@stacks/transactions/dist/clarity/types/principalCV'; +import { ClarityValue, noneCV, principalCV, someCV, uintCV } from '@stacks/transactions'; import * as yup from 'yup'; import { UI_IMPOSED_MAX_STACKING_AMOUNT_USTX } from '@constants/app'; import { cyclesToBurnChainHeight } from '@utils/calculate-burn-height'; import { stxToMicroStx, toHumanReadableStx } from '@utils/unit-convert'; -// import { stxPrincipalSchema } from '@utils/validators/stx-address-validator'; import { stxAmountSchema } from '@utils/validators/stx-amount-validator'; import { pools } from './components/preset-pools'; diff --git a/src/pages/stacking/start-pooled-stacking/utils-preset-pools.ts b/src/pages/stacking/start-pooled-stacking/utils-preset-pools.ts index c58cd507..2d806fe4 100644 --- a/src/pages/stacking/start-pooled-stacking/utils-preset-pools.ts +++ b/src/pages/stacking/start-pooled-stacking/utils-preset-pools.ts @@ -1,5 +1,4 @@ -import { ChainID } from '@stacks/common'; -import { StacksNetwork } from '@stacks/network'; +import { ChainId, StacksNetwork } from '@stacks/network'; import { DEFAULT_DEVNET_SERVER } from 'src/constants'; import { pools } from './components/preset-pools'; @@ -14,9 +13,9 @@ import { } from './types-preset-pools'; export function getNetworkInstance(network: StacksNetwork) { - if (network.chainId === ChainID.Mainnet) { + if (network.chainId === ChainId.Mainnet) { return NetworkInstance.mainnet; - } else if (network.coreApiUrl === DEFAULT_DEVNET_SERVER) { + } else if (network.client.baseUrl === DEFAULT_DEVNET_SERVER) { return NetworkInstance.devnet; } else { return NetworkInstance.testnet; diff --git a/src/types/network.ts b/src/types/network.ts index 9f11a91c..41a30277 100644 --- a/src/types/network.ts +++ b/src/types/network.ts @@ -1,20 +1,20 @@ import { StacksNetworkName } from '@stacks/network'; -import { ChainID } from '@stacks/transactions'; +import { ChainId } from '@stacks/network'; export interface Network { label: string; url: string; - networkId: ChainID; + networkId: ChainId; mode: StacksNetworkName; wsUrl?: string; isCustomNetwork?: boolean; } interface WhenStacksChainIdMap { - [ChainID.Mainnet]: T; - [ChainID.Testnet]: T; + [ChainId.Mainnet]: T; + [ChainId.Testnet]: T; } -export function whenStacksChainId(chainId: ChainID) { +export function whenStacksChainId(chainId: ChainId) { return (chainIdMap: WhenStacksChainIdMap): T => chainIdMap[chainId]; } interface WhenStacksModeMap { diff --git a/src/utils/fetch-with-api-keys.ts b/src/utils/fetch-with-api-keys.ts deleted file mode 100644 index 32fe3cd5..00000000 --- a/src/utils/fetch-with-api-keys.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { createApiKeyMiddleware, createFetchFn } from '@stacks/network'; - -import { X_API_KEY } from '../constants'; - -const apiMiddleware = createApiKeyMiddleware({ apiKey: X_API_KEY }); -export const fetchWithApiKey = createFetchFn(apiMiddleware); diff --git a/src/utils/stacking.ts b/src/utils/stacking.ts index c2452033..12008f8b 100644 --- a/src/utils/stacking.ts +++ b/src/utils/stacking.ts @@ -1,5 +1,4 @@ -import { ChainID } from '@stacks/common'; -import { StacksNetwork } from '@stacks/network'; +import { ChainId, StacksNetwork } from '@stacks/network'; import { poxAddressToBtcAddress } from '@stacks/stacking'; import { whenStacksChainId } from 'src/types/network'; @@ -19,8 +18,8 @@ export const formatPoxAddressToNetwork = ( ) => { return convertPoxAddressToBtc( whenStacksChainId(network.chainId)({ - [ChainID.Mainnet]: 'mainnet', - [ChainID.Testnet]: 'testnet', + [ChainId.Mainnet]: 'mainnet', + [ChainId.Testnet]: 'testnet', }) )(poxAddress); }; diff --git a/src/utils/sum-stx-tx-total.ts b/src/utils/sum-stx-tx-total.ts index 3360590f..f162de89 100644 --- a/src/utils/sum-stx-tx-total.ts +++ b/src/utils/sum-stx-tx-total.ts @@ -40,5 +40,6 @@ export function sumStxTxTotal( current.event_type === 'stx_asset' && current.asset.asset_event_type === 'transfer' ? new BigNumber(current.asset.amount || 0).plus(prev) : initialValue; + return tx.events.reduce(sumEventTransferHandler, initialValue).plus(tx.fee_rate); }