diff --git a/web/apps/admin/package-lock.json b/web/apps/admin/package-lock.json index 99c947578..e02d05716 100644 --- a/web/apps/admin/package-lock.json +++ b/web/apps/admin/package-lock.json @@ -17,7 +17,7 @@ "@radix-ui/react-icons": "^1.3.0", "@raystack/apsara": "^0.53.2", "@raystack/frontier": "^0.78.0", - "@raystack/proton": "0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c", + "@raystack/proton": "0.1.0-b1687af73f994fa9612a023c850aa97c35735af8", "@stitches/react": "^1.2.8", "@tanstack/react-query": "^5.83.0", "@tanstack/react-query-devtools": "^5.90.2", @@ -5326,9 +5326,9 @@ } }, "node_modules/@raystack/proton": { - "version": "0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c", - "resolved": "https://registry.npmjs.org/@raystack/proton/-/proton-0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c.tgz", - "integrity": "sha512-89mY2J9CqdZmeO2ZRO2+3uuP9gmOIxlaAh1f+jDnKgHr7XVHE+B6qoJ9nW3koTEzVRNMUyIbR6fKN3ZftIpdFA==", + "version": "0.1.0-b1687af73f994fa9612a023c850aa97c35735af8", + "resolved": "https://registry.npmjs.org/@raystack/proton/-/proton-0.1.0-b1687af73f994fa9612a023c850aa97c35735af8.tgz", + "integrity": "sha512-kKaLa9tESbGQ8cFnB3gfSaPKyOJHqXXIaFGPLKwD9eknwLm4Uu7Uj+3mhY79wDvvTFxSidTl0YkzhzvSPuQphw==", "license": "Apache-2.0", "dependencies": { "@bufbuild/protobuf": "^2.6.2", @@ -5882,7 +5882,7 @@ "version": "18.3.0", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", - "dev": true, + "devOptional": true, "dependencies": { "@types/react": "*" } @@ -6546,7 +6546,7 @@ }, "node_modules/esbuild": { "version": "0.18.20", - "dev": true, + "devOptional": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -7314,7 +7314,7 @@ "version": "3.3.8", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", - "dev": true, + "devOptional": true, "funding": [ { "type": "github", @@ -7599,7 +7599,7 @@ }, "node_modules/postcss": { "version": "8.4.31", - "dev": true, + "devOptional": true, "funding": [ { "type": "opencollective", @@ -8240,7 +8240,7 @@ }, "node_modules/rollup": { "version": "3.29.4", - "dev": true, + "devOptional": true, "license": "MIT", "bin": { "rollup": "dist/bin/rollup" @@ -8392,7 +8392,7 @@ }, "node_modules/source-map-js": { "version": "1.0.2", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -8620,7 +8620,7 @@ "version": "5.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -8765,7 +8765,7 @@ "version": "4.5.9", "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.9.tgz", "integrity": "sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "esbuild": "^0.18.10", diff --git a/web/apps/admin/package.json b/web/apps/admin/package.json index 5df19f256..ae36cb75e 100644 --- a/web/apps/admin/package.json +++ b/web/apps/admin/package.json @@ -20,7 +20,7 @@ "@radix-ui/react-icons": "^1.3.0", "@raystack/apsara": "^0.53.2", "@raystack/frontier": "^0.78.0", - "@raystack/proton": "0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c", + "@raystack/proton": "0.1.0-b1687af73f994fa9612a023c850aa97c35735af8", "@stitches/react": "^1.2.8", "@tanstack/react-query": "^5.83.0", "@tanstack/react-query-devtools": "^5.90.2", diff --git a/web/lib/package.json b/web/lib/package.json index 91bf5b0bc..92f544927 100644 --- a/web/lib/package.json +++ b/web/lib/package.json @@ -91,7 +91,7 @@ "@connectrpc/connect-query": "^2.1.1", "@connectrpc/connect-web": "^2.0.2", "@hookform/resolvers": "^3.10.0", - "@raystack/proton": "0.1.0-80fc5ba1e538e38d5ca190386af1e69ee64584ee", + "@raystack/proton": "0.1.0-b1687af73f994fa9612a023c850aa97c35735af8", "@tanstack/react-query": "^5.83.0", "@tanstack/react-router": "1.58.17", "axios": "^1.9.0", diff --git a/web/lib/react/contexts/FrontierContext.tsx b/web/lib/react/contexts/FrontierContext.tsx index 2937e9a8a..c735f681d 100644 --- a/web/lib/react/contexts/FrontierContext.tsx +++ b/web/lib/react/contexts/FrontierContext.tsx @@ -245,11 +245,10 @@ export const FrontierContextProvider = ({ FrontierServiceQueries.getBillingAccount, create(GetBillingAccountRequestSchema, { id: billingAccountId, - orgId: activeOrganization?.id ?? '', withPaymentMethods: true, withBillingDetails: true }), - { enabled: !!activeOrganization?.id && !!billingAccountId } + { enabled: !!billingAccountId } ); const billingAccount = billingAccountData?.billingAccount; diff --git a/web/lib/react/hooks/useTokens.ts b/web/lib/react/hooks/useTokens.ts index b8f616f51..62ca7875d 100644 --- a/web/lib/react/hooks/useTokens.ts +++ b/web/lib/react/hooks/useTokens.ts @@ -22,11 +22,10 @@ export const useTokens = (): UseTokensReturn => { } = useQuery( FrontierServiceQueries.getBillingBalance, create(GetBillingBalanceRequestSchema, { - orgId: billingAccount?.orgId ?? '', id: billingAccount?.id ?? '' }), { - enabled: !!billingAccount?.orgId && !!billingAccount?.id, + enabled: !!billingAccount?.id, retry: false } ); @@ -44,7 +43,7 @@ export const useTokens = (): UseTokensReturn => { [data?.balance?.amount] ); - return { + return { tokenBalance, isTokensLoading, fetchTokenBalance: refetch diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 5535adc16..0ce179721 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -61,8 +61,8 @@ importers: specifier: ^0.78.0 version: 0.78.2(@connectrpc/connect@2.1.0(@bufbuild/protobuf@2.11.0))(@raystack/apsara@0.53.6(@types/react-dom@18.3.7(@types/react@18.3.23))(@types/react@18.3.23)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@tanstack/query-core@5.83.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@raystack/proton': - specifier: 0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c - version: 0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 0.1.0-b1687af73f994fa9612a023c850aa97c35735af8 + version: 0.1.0-b1687af73f994fa9612a023c850aa97c35735af8(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@stitches/react': specifier: ^1.2.8 version: 1.2.8(react@18.3.1) @@ -225,8 +225,8 @@ importers: specifier: ^3.10.0 version: 3.10.0(react-hook-form@7.57.0(react@18.3.1)) '@raystack/proton': - specifier: 0.1.0-80fc5ba1e538e38d5ca190386af1e69ee64584ee - version: 0.1.0-80fc5ba1e538e38d5ca190386af1e69ee64584ee(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 0.1.0-b1687af73f994fa9612a023c850aa97c35735af8 + version: 0.1.0-b1687af73f994fa9612a023c850aa97c35735af8(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@tanstack/react-query': specifier: ^5.83.0 version: 5.83.0(react@18.3.1) @@ -2271,16 +2271,8 @@ packages: vue: optional: true - '@raystack/proton@0.1.0-80fc5ba1e538e38d5ca190386af1e69ee64584ee': - resolution: {integrity: sha512-xsJG9wmVEWYELEyq2ZXZhDPK4rlVvlq5j0mDTllG939MM7rFrMFpXzbrf8FYkOIP2b42XA7xlAYpV6gFi2nI7g==} - peerDependencies: - '@tanstack/react-query': ^5.0.0 - peerDependenciesMeta: - '@tanstack/react-query': - optional: true - - '@raystack/proton@0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c': - resolution: {integrity: sha512-89mY2J9CqdZmeO2ZRO2+3uuP9gmOIxlaAh1f+jDnKgHr7XVHE+B6qoJ9nW3koTEzVRNMUyIbR6fKN3ZftIpdFA==} + '@raystack/proton@0.1.0-b1687af73f994fa9612a023c850aa97c35735af8': + resolution: {integrity: sha512-kKaLa9tESbGQ8cFnB3gfSaPKyOJHqXXIaFGPLKwD9eknwLm4Uu7Uj+3mhY79wDvvTFxSidTl0YkzhzvSPuQphw==} peerDependencies: '@tanstack/react-query': ^5.0.0 peerDependenciesMeta: @@ -9925,21 +9917,7 @@ snapshots: - debug - react-dom - '@raystack/proton@0.1.0-80fc5ba1e538e38d5ca190386af1e69ee64584ee(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@bufbuild/protobuf': 2.11.0 - '@connectrpc/connect': 2.1.0(@bufbuild/protobuf@2.11.0) - '@connectrpc/connect-query': 2.1.1(@bufbuild/protobuf@2.11.0)(@connectrpc/connect@2.1.0(@bufbuild/protobuf@2.11.0))(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@protobuf-ts/runtime': 2.11.1 - '@protobuf-ts/runtime-rpc': 2.11.1 - optionalDependencies: - '@tanstack/react-query': 5.83.0(react@18.3.1) - transitivePeerDependencies: - - '@tanstack/query-core' - - react - - react-dom - - '@raystack/proton@0.1.0-d7ccfeef8ed0a304b5da3537c1b2bb5e7d99c77c(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@raystack/proton@0.1.0-b1687af73f994fa9612a023c850aa97c35735af8(@tanstack/query-core@5.83.0)(@tanstack/react-query@5.83.0(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@bufbuild/protobuf': 2.11.0 '@connectrpc/connect': 2.1.0(@bufbuild/protobuf@2.11.0)