From 1905d147bfd6f94e9148c345fa34db58ebab1141 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Mon, 6 Jun 2022 11:00:50 -0700 Subject: [PATCH] Reset mission control only on no routes found failure --- api/tasks.py | 6 ++++-- frontend/src/components/EncryptedChat.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/tasks.py b/api/tasks.py index 85baff34..ffe50e67 100644 --- a/api/tasks.py +++ b/api/tasks.py @@ -132,8 +132,10 @@ def follow_send_payment(hash): } print(context) - # If failed, reset mission control. (This won't scale well, just a temporary fix) - LNNode.resetmc() + # If failed due to not route, reset mission control. (This won't scale well, just a temporary fix) + if response.failure_reason==2: + LNNode.resetmc() + return False, context if response.status == 2: # Status 2 'SUCCEEDED' diff --git a/frontend/src/components/EncryptedChat.js b/frontend/src/components/EncryptedChat.js index 7c3c19b7..a203fe35 100644 --- a/frontend/src/components/EncryptedChat.js +++ b/frontend/src/components/EncryptedChat.js @@ -241,7 +241,7 @@ class Chat extends Component { } subheader={this.state.showPGP[props.index] ? {props.message.time}
{"Valid signature: " + props.message.validSignature}
{props.message.encryptedMessage}
: props.message.plainTextMessage} - subheaderTypographyProps={{sx: {wordWrap: "break-word", width: '215px', color: '#444444', fontSize: this.state.showPGP[props.index]? 11 : null }}} + subheaderTypographyProps={{sx: {wordWrap: "break-word", width: '200px', color: '#444444', fontSize: this.state.showPGP[props.index]? 11 : null }}} /> )