From 381363c3cceb57bf66e13390fe24813360e154a3 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 21 Mar 2024 08:36:14 -0700 Subject: [PATCH 1/5] update error message to be more clear --- lib/view_model/lightning_invoice_page_view_model.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/view_model/lightning_invoice_page_view_model.dart b/lib/view_model/lightning_invoice_page_view_model.dart index eb09e6f97..52c79b3cc 100644 --- a/lib/view_model/lightning_invoice_page_view_model.dart +++ b/lib/view_model/lightning_invoice_page_view_model.dart @@ -84,6 +84,10 @@ abstract class LightningInvoicePageViewModelBase with Store { state = FailureState('Amount is too small'); return; } + if (maximum == 0) { + state = FailureState('Your inbound liquidity is 0!'); + return; + } if (maximum != null && amountInCrypto > maximum!) { state = FailureState('Amount is too big'); return; From d0c2c2802b7faf572c562611d36ef560db2113d8 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 21 Mar 2024 08:38:39 -0700 Subject: [PATCH 2/5] revert and fix --- lib/view_model/lightning_invoice_page_view_model.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/view_model/lightning_invoice_page_view_model.dart b/lib/view_model/lightning_invoice_page_view_model.dart index 52c79b3cc..16ce4c82a 100644 --- a/lib/view_model/lightning_invoice_page_view_model.dart +++ b/lib/view_model/lightning_invoice_page_view_model.dart @@ -84,11 +84,7 @@ abstract class LightningInvoicePageViewModelBase with Store { state = FailureState('Amount is too small'); return; } - if (maximum == 0) { - state = FailureState('Your inbound liquidity is 0!'); - return; - } - if (maximum != null && amountInCrypto > maximum!) { + if (maximum != null && maximum != 0 && amountInCrypto > maximum!) { state = FailureState('Amount is too big'); return; } From 9f782956caaf1fb58e4187c9b2844d4daf06d1ba Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 21 Mar 2024 09:18:48 -0700 Subject: [PATCH 3/5] just set hard cap on invoice max --- lib/view_model/lightning_invoice_page_view_model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/view_model/lightning_invoice_page_view_model.dart b/lib/view_model/lightning_invoice_page_view_model.dart index 16ce4c82a..65c4fd9b1 100644 --- a/lib/view_model/lightning_invoice_page_view_model.dart +++ b/lib/view_model/lightning_invoice_page_view_model.dart @@ -84,7 +84,7 @@ abstract class LightningInvoicePageViewModelBase with Store { state = FailureState('Amount is too small'); return; } - if (maximum != null && maximum != 0 && amountInCrypto > maximum!) { + if (amountInCrypto > 4000000) { state = FailureState('Amount is too big'); return; } From a067293b64a51798ab4972f37d6ccd3f290af1bf Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Sun, 24 Mar 2024 04:02:28 +0200 Subject: [PATCH 4/5] Update pr_test_build.yml --- .github/workflows/pr_test_build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 4ed03584d..7d80e7e9e 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -82,6 +82,15 @@ jobs: ./build_all.sh ./copy_monero_deps.sh + - name: Empty unused space + run: | + cd /opt/android/ + rm -r monero + rm -r haven + rm -r libsodium + rm -r libzmq + rm -r unbound-1.16.2 + - name: Install Flutter dependencies run: | cd /opt/android/cake_wallet From 8e9558199aeeb77b0051642b8c7aa8a4d69f6e2f Mon Sep 17 00:00:00 2001 From: Omar Hatem Date: Sun, 24 Mar 2024 05:13:45 +0200 Subject: [PATCH 5/5] Update pr_test_build.yml --- .github/workflows/pr_test_build.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/pr_test_build.yml b/.github/workflows/pr_test_build.yml index 7d80e7e9e..4ed03584d 100644 --- a/.github/workflows/pr_test_build.yml +++ b/.github/workflows/pr_test_build.yml @@ -82,15 +82,6 @@ jobs: ./build_all.sh ./copy_monero_deps.sh - - name: Empty unused space - run: | - cd /opt/android/ - rm -r monero - rm -r haven - rm -r libsodium - rm -r libzmq - rm -r unbound-1.16.2 - - name: Install Flutter dependencies run: | cd /opt/android/cake_wallet