From addeb6e2b190ed4a858ccdd987edc65aeee3592f Mon Sep 17 00:00:00 2001 From: shubham Date: Wed, 1 May 2024 17:27:33 +0530 Subject: [PATCH] Change timeout error in LSPStore and format some order response values --- stores/LSPStore.ts | 5 ++- views/Settings/LSPS1/index.tsx | 58 ++++++++++++++++++++++++++++------ 2 files changed, 51 insertions(+), 12 deletions(-) diff --git a/stores/LSPStore.ts b/stores/LSPStore.ts index bdafe2695a..7e9b4bec7b 100644 --- a/stores/LSPStore.ts +++ b/stores/LSPStore.ts @@ -369,9 +369,8 @@ export default class LSPStore { let timer = 10000; const timeoutId = setTimeout(() => { this.error = true; - this.error_msg = `Timeout error: Data not received within ${ - timer / 1000 - } seconds`; + this.error_msg = 'Did not receive response from server'; + this.loading = false; }, timer); if (this.settingsStore.implementation === 'embedded-lnd') { diff --git a/views/Settings/LSPS1/index.tsx b/views/Settings/LSPS1/index.tsx index 01486ba34a..81f66a09de 100644 --- a/views/Settings/LSPS1/index.tsx +++ b/views/Settings/LSPS1/index.tsx @@ -11,6 +11,7 @@ import { } from 'react-native'; import EncryptedStorage from 'react-native-encrypted-storage'; import Slider from '@react-native-community/slider'; +import moment from 'moment'; import { v4 as uuidv4 } from 'uuid'; import CaretDown from '../../../assets/images/SVG/Caret Down.svg'; @@ -25,6 +26,7 @@ import KeyValue from '../../../components/KeyValue'; import Switch from '../../../components/Switch'; import { ErrorMessage } from '../../../components/SuccessErrorMessage'; import { Row } from '../../../components/layout/Row'; +import Amount from '../../../components/Amount'; import BackendUtils from '../../../utils/BackendUtils'; import { themeColor } from '../../../utils/ThemeUtils'; @@ -368,9 +370,15 @@ export default class LSPS1 extends React.Component { )} {result.client_balance_sat && ( } /> )} @@ -385,19 +393,35 @@ export default class LSPS1 extends React.Component { {result.created_at && ( )} {result.expires_at && ( )} {result.lsp_balance_sat && ( + } /> )} {result.order_id && ( @@ -416,7 +440,15 @@ export default class LSPS1 extends React.Component { {payment.fee_total_sat && ( + } /> )} {(payment.lightning_invoice || @@ -465,8 +497,16 @@ export default class LSPS1 extends React.Component { )} {payment.order_total_sat && ( + } /> )}