Skip to content

Commit 69d1169

Browse files
committed
Fix wallet URL configuration to require explicit environment variable
- Remove auto-detection fallback that was causing incorrect URL usage - Always require REACT_APP_WALLET_BASE_URL to be explicitly set - Prevent panel from incorrectly trying localhost:9002/wallet instead of localhost:9003 - Add clear error message when wallet URL environment variable is missing
1 parent cd802c6 commit 69d1169

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/config/config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ const getWalletURL = (): string => {
1818
return 'http://localhost:9003';
1919
}
2020

21-
// For both development and production, wallet API is at /wallet path
22-
return process.env.REACT_APP_WALLET_BASE_URL || `${window.location.origin}/wallet`;
21+
// Always require explicit wallet URL configuration
22+
if (!process.env.REACT_APP_WALLET_BASE_URL) {
23+
throw new Error('REACT_APP_WALLET_BASE_URL must be explicitly configured in environment variables');
24+
}
25+
26+
return process.env.REACT_APP_WALLET_BASE_URL;
2327
};
2428

2529
const config = {

0 commit comments

Comments
 (0)