diff --git a/src/App.tsx b/src/App.tsx index e5ddf2d..5664637 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -64,12 +64,12 @@ function App() { // Get Accounts const [account, setAccount] = useState(null); const getAccounts = () => { + const providerId = window.localStorage.getItem('providerId'); axios - .get(BRIDGE_URL + '/accounts', { + .get(BRIDGE_URL + '/accounts/' + providerId, { withCredentials: true, headers: { 'Content-Type': 'application/json', - // 'Access-Control-Allow-Origin': '*', 'ngrok-skip-browser-warning': 'true', }, }) diff --git a/src/components/connectOverlay/ConnectOverlay.tsx b/src/components/connectOverlay/ConnectOverlay.tsx index 031f9f7..227abc4 100644 --- a/src/components/connectOverlay/ConnectOverlay.tsx +++ b/src/components/connectOverlay/ConnectOverlay.tsx @@ -50,6 +50,9 @@ const ConnectOverlay: React.FC = ({ const response = await axios.post(BRIDGE_URL + '/init-provider'); const providerId = response.data.providerId; + + window.localStorage.setItem('providerId', providerId); + WebApp.openLink(response.data.universalLink); close();