websocket check for error message

This commit is contained in:
Sosthene 2024-05-27 12:14:53 +02:00
parent bc6f95a98f
commit cca4e742c0

View File

@ -31,7 +31,11 @@ class WebSocketClient {
// By parsing the message, we can link it with existing cached message and return the updated version of the message
let res: CachedMessage = await services.parseNetworkMessage(msgData, feeRate);
console.debug(res);
if (res.status === 'FaucetComplete') {
if (res.status === 'Error') {
if (res.error) {
console.error(res.error);
}
} else if (res.status === 'FaucetComplete') {
// we received a faucet tx, there's nothing else to do
window.alert(`New faucet output\n${res.commited_in}`);
await services.updateMessages(res);