mirror of
https://github.com/joinmarket-webui/jam.git
synced 2026-08-20 13:28:21 +02:00
Fix websocket connection
Use the local proxy for the web socket connection
This commit is contained in:
parent
c290ed6fe4
commit
ca009e01b3
1 changed files with 5 additions and 5 deletions
|
|
@ -15,7 +15,7 @@ const DisplayWallet = ({listWalletInfo,onSend,listUTXOs}) => {
|
|||
useEffect(()=>{
|
||||
const name = JSON.parse(sessionStorage.getItem('auth')).name;
|
||||
const token = JSON.parse(sessionStorage.getItem('auth')).token;
|
||||
ws = new WebSocket("wss://127.0.0.1:28283");
|
||||
ws = new WebSocket(`ws://${window.location.hostname}:${window.location.port}`);
|
||||
ws.onopen = (event) => {
|
||||
console.log("connected to websocket");
|
||||
ws.send(token);
|
||||
|
|
@ -44,11 +44,11 @@ const DisplayWallet = ({listWalletInfo,onSend,listUTXOs}) => {
|
|||
setUTXOHistory(utxos)
|
||||
console.log(utxos)
|
||||
}
|
||||
|
||||
|
||||
getWalletInfo();
|
||||
getUTXOs();
|
||||
},[])
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
Wallet Details
|
||||
|
|
@ -61,13 +61,13 @@ const DisplayWallet = ({listWalletInfo,onSend,listUTXOs}) => {
|
|||
<p></p>
|
||||
|
||||
{
|
||||
showUTXO?
|
||||
showUTXO?
|
||||
Object.entries(UTXOHistory).map(([key, val])=>
|
||||
<DisplayUTXOs key={key} utxoID={key} utxo={val}> </DisplayUTXOs>
|
||||
)
|
||||
|
||||
: ""
|
||||
}
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue