Skip to content

Commit 35afeeb

Browse files
committed
chore(frontend): parameterize Binance WS URL via VITE_WS_URL_BINANCE and update plan
1 parent b721fc6 commit 35afeeb

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/frontend/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
VITE_API_BASE_URL=http://127.0.0.1:8000
22
VITE_WS_URL=ws://127.0.0.1:8000/ws
3-
3+
VITE_WS_URL_BINANCE=wss://stream.binance.com:9443/ws/btcusdt@ticker

apps/frontend/src/components/logged/ActualPrice.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ function ActualPrice() {
55

66
const [numero,setNumero] = useState(0);
77

8-
const { lastJsonMessage, sendMessage } = useWebSocket('wss://stream.binance.com:9443/ws/btcusdt@ticker', {
8+
const WS_URL = import.meta.env.VITE_WS_URL_BINANCE || 'wss://stream.binance.com:9443/ws/btcusdt@ticker'
9+
const { lastJsonMessage, sendMessage } = useWebSocket(WS_URL, {
910
onOpen: () => console.log(`Connected to App WS`),
1011
onMessage: () => {
1112
if (lastJsonMessage) {

docs/MIGRATION_PLAN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Steps
4141
- [x] Configure envs (`VITE_API_BASE_URL`, `VITE_WS_URL`) and update README
4242
- [x] Normalize env usage in Dataframe.jsx (use VITE_API_BASE_URL)
4343
- [x] Normalize env usage in Patrimony.jsx and Balance.jsx
44+
- [x] Parameterize Binance WS URL in ActualPrice.jsx via `VITE_WS_URL_BINANCE`
4445
- [ ] Add minimal contract tests for adapters (mock fetch/WS)
4546
6) GitOps/Infra alignment
4647
- [ ] Restructure manifests to `infra/k8s/{base,overlays}` or Helm/Kustomize

0 commit comments

Comments
 (0)