diff --git a/src/websockets.ts b/src/websockets.ts index 6cc35c5..04d47ef 100644 --- a/src/websockets.ts +++ b/src/websockets.ts @@ -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);