From 98affc750db1f536908ba48266cf823dad2902b0 Mon Sep 17 00:00:00 2001 From: woahwhattheheck Date: Sun, 4 Oct 2026 20:51:52 -0400 Subject: [PATCH 1/4] fix(frontend): use canonical auth token for cash-flow API --- frontend/src/services/cashFlowForecastApi.ts | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/frontend/src/services/cashFlowForecastApi.ts b/frontend/src/services/cashFlowForecastApi.ts index 9ccef1e1..14106a15 100644 --- a/frontend/src/services/cashFlowForecastApi.ts +++ b/frontend/src/services/cashFlowForecastApi.ts @@ -3,6 +3,11 @@ import axios, { type AxiosError } from 'axios'; const API_BASE_URL = (import.meta.env.VITE_API_BASE_URL as string | undefined) || 'http://localhost:3001'; +function authHeaders() { + const token = localStorage.getItem('payd_auth_token'); + return token ? { Authorization: `Bearer ${token}` } : {}; +} + export interface HistoricalPayrollData { period: string; totalAmount: number; @@ -104,9 +109,7 @@ export const getForecast = async (params: ForecastParams): Promise Date: Sun, 4 Oct 2026 20:51:54 -0400 Subject: [PATCH 2/4] fix(frontend): stabilize cash-flow forecast loading --- frontend/src/pages/CashFlowForecast.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/pages/CashFlowForecast.tsx b/frontend/src/pages/CashFlowForecast.tsx index b3796322..8323e869 100644 --- a/frontend/src/pages/CashFlowForecast.tsx +++ b/frontend/src/pages/CashFlowForecast.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, useMemo, useCallback } from 'react'; +import { useState, useMemo, useCallback } from 'react'; import { BarChart, Bar, @@ -49,18 +49,22 @@ export default function CashFlowForecast() { forecastDays: 90, }); + const { distributionAccount, assetIssuer, forecastDays } = params; + const loadForecast = useCallback(async () => { - if (!params.distributionAccount || !params.assetIssuer) { + if (!distributionAccount || !assetIssuer) { notifyError('Please provide distribution account and asset issuer'); return; } + const requestParams = { distributionAccount, assetIssuer, forecastDays }; + setIsLoading(true); try { const [forecastData, historicalData, alertsData] = await Promise.all([ - getForecast(params), + getForecast(requestParams), getHistoricalData(6), - getAlerts(params), + getAlerts(requestParams), ]); setForecast(forecastData); @@ -72,11 +76,7 @@ export default function CashFlowForecast() { } finally { setIsLoading(false); } - }, [params, notifyError, notifySuccess]); - - useEffect(() => { - void loadForecast(); - }, [loadForecast]); + }, [distributionAccount, assetIssuer, forecastDays, notifyError, notifySuccess]); const chartData = useMemo(() => { if (!forecast) return []; From 6d52e7b46617c5e48f355644d959edda497adfdc Mon Sep 17 00:00:00 2001 From: woahwhattheheck Date: Mon, 5 Oct 2026 15:17:05 -0400 Subject: [PATCH 3/4] ci: remove unsupported root retention settings Repair GitHub Actions workflow validation for fleet branches. Preserve job definitions, event filters, permissions, artifact retention inputs, and all application files. --- .github/workflows/build.yml | 1 - .github/workflows/contract-release.yml | 1 - .github/workflows/dapp-ipfs.yml | 1 - .github/workflows/secrets-check.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52029992..9d71b0a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,4 +115,3 @@ jobs: run: npm test --if-present # Workflow run retention settings -retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/contract-release.yml b/.github/workflows/contract-release.yml index 2655fcbc..3f66b1a5 100644 --- a/.github/workflows/contract-release.yml +++ b/.github/workflows/contract-release.yml @@ -29,4 +29,3 @@ jobs: release_token: ${{ secrets.GITHUB_TOKEN }} # Workflow run retention settings -retention-days: 90 \ No newline at end of file diff --git a/.github/workflows/dapp-ipfs.yml b/.github/workflows/dapp-ipfs.yml index 29d16e55..42248532 100644 --- a/.github/workflows/dapp-ipfs.yml +++ b/.github/workflows/dapp-ipfs.yml @@ -67,4 +67,3 @@ jobs: echo "- URL: ${{ steps.storacha.outputs.url }}" >> "$GITHUB_STEP_SUMMARY" # Workflow run retention settings -retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/secrets-check.yml b/.github/workflows/secrets-check.yml index b8d3b7e8..c7a34807 100644 --- a/.github/workflows/secrets-check.yml +++ b/.github/workflows/secrets-check.yml @@ -22,4 +22,3 @@ jobs: run: ./scripts/check-k8s-secrets.sh # Workflow run retention settings -retention-days: 30 \ No newline at end of file From 9d671f2038f4f3bd67033dd2ef8c5d44d84dafb9 Mon Sep 17 00:00:00 2001 From: woahwhattheheck Date: Mon, 5 Oct 2026 17:16:47 -0400 Subject: [PATCH 4/4] revert(ci): keep PayD #542 carrier cash-flow only Restore the four workflow files changed by 6d52e7b so this pull request remains scoped to issue #542. The separate workflow-syntax repair stays isolated in its own carrier. --- .github/workflows/build.yml | 1 + .github/workflows/contract-release.yml | 1 + .github/workflows/dapp-ipfs.yml | 1 + .github/workflows/secrets-check.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d71b0a9..52029992 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,3 +115,4 @@ jobs: run: npm test --if-present # Workflow run retention settings +retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/contract-release.yml b/.github/workflows/contract-release.yml index 3f66b1a5..2655fcbc 100644 --- a/.github/workflows/contract-release.yml +++ b/.github/workflows/contract-release.yml @@ -29,3 +29,4 @@ jobs: release_token: ${{ secrets.GITHUB_TOKEN }} # Workflow run retention settings +retention-days: 90 \ No newline at end of file diff --git a/.github/workflows/dapp-ipfs.yml b/.github/workflows/dapp-ipfs.yml index 42248532..29d16e55 100644 --- a/.github/workflows/dapp-ipfs.yml +++ b/.github/workflows/dapp-ipfs.yml @@ -67,3 +67,4 @@ jobs: echo "- URL: ${{ steps.storacha.outputs.url }}" >> "$GITHUB_STEP_SUMMARY" # Workflow run retention settings +retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/secrets-check.yml b/.github/workflows/secrets-check.yml index c7a34807..b8d3b7e8 100644 --- a/.github/workflows/secrets-check.yml +++ b/.github/workflows/secrets-check.yml @@ -22,3 +22,4 @@ jobs: run: ./scripts/check-k8s-secrets.sh # Workflow run retention settings +retention-days: 30 \ No newline at end of file