Commit graph

1701 commits

Author SHA1 Message Date
dni ⚡
78a98ca97d
Boltz.exchange Extension (#922)
* initial commit and still draft, ready for review

* forgot to uncomment this line

* fee estimation and blockheight

* resolve conversation with michael, to use mempool websockets instead of boltz status event

* Update lnbits/extensions/boltz/boltz.py

Co-authored-by: michael1011 <me@michael1011.at>

* add status to swaps, add sorting and data into listing

* add swap status checks, change urls to docker test setup, dynamic minimum and maximum limits

* fix docker hosts for development

* add api endpoints to _api_docs

* add wallet name and id, to list and status information

* fix status_update for reverse_swaps

* chore: format with black

* more blackformatting and refactoring create_swap()

* fix variable bug

* check if swap is already refunded

* use create_task instead of ensure_future

* add mempool and boltz urls depending on DEBUG .env

* raise exception in mempool fails

* fix onchain txs, sending funds to wrong address and add a refund address for normal swaps beforehand

* add status to swaps, add sorting and data into listing

* add swap status checks, change urls to docker test setup, dynamic minimum and maximum limits

* add wallet name and id, to list and status information

* fix status_update for reverse_swaps

* chore: format with black

* use create_task instead of ensure_future

* add mempool and boltz urls depending on DEBUG .env

* fix onchain txs, sending funds to wrong address and add a refund address for normal swaps beforehand

* black formatting

* add some logging with loguru, and remove function duplication

* cleanup readme

* updates/suggestions from calle

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* remove unused comments

* Update API Endpoints

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* un-factor get_boltz_pairs

* added a explaination for the onchain tx

* remove unused template file

* rename api endpoints

* fix isort and prettier

* more verbose logging!!

* add boltz to mock_data.zip

* new mockdata

* remove comment

* better readme

* fix mempool urls

* change /refund /check /status to post requests

* first step in tests2

* add first tests

* change refund,check,status to post requests

* next try on tests

* overall code improvements

* just testing tests

* throw http exceptions in views_api

* require admincheck for refund,check,status and added fastapi documentation for those

* added more tests

* black

* many code improvements

* adding tests

* temp fix test

* fix race condition when pay_invoice fails

* test are working

* add boltz env variables

* add startup check, bugfixes, improvements

* improve on status checking

* remove check_invoice_status

* more fixes and tests

* testing testing testing

* make tests run again inside regtest

* fix bad error :O

* fix postgres boolean bug and add swap test

* Update README.md

Update README.md

Update README.md

Update README.md

* some mypy

* blacked

* the missing commit?

* fix api_docs readme link

* better refunding error catching

fix

* check swaps now also shows pending reverse swap, ui improvements, tooltips

* add backend check for boltz limits

fixup

* many improvements, startup check for swaps working, reverse needs more testing

* little last fixes

* remove unused logic

* fastapi documentation

fixup

* formatting and remove unused tests

* fix test

* fix swapstatus model

* Update lnbits/extensions/boltz/tasks.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update lnbits/extensions/boltz/views_api.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* balance check msg, format

* fix mypy data override

* fix swapstatus, remove can refund column

* Update lnbits/extensions/boltz/README.md

Co-authored-by: michael1011 <me@michael1011.at>

* empty lines

* fix error message when swap is not found

* remove preimage_hash from database

* fix api_docs html

fix api_docs html

* catch boltz network exceptions better

* formatting

* check for timeout on swap at get request

Co-authored-by: michael1011 <me@michael1011.at>
Co-authored-by: fusion44 <some.fusion@gmail.com>
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2022-08-30 12:51:17 +02:00
Lee Salminen
4e63662f42 add external_id field for external use 2022-08-29 14:51:18 -06:00
Lee Salminen
81ed71a2e4 update README to reflect latest changes 2022-08-29 12:04:08 -06:00
Lee Salminen
993511bcd4 fix validation check for existing card UID, was preventing all edits of cards. we should validate a bit differently for updates vs. creates 2022-08-29 09:40:35 -06:00
Lee Salminen
a6cf19c29d potential race condition here, hits is dependent on cards to get the card name in hits 2022-08-29 09:33:28 -06:00
Lee Salminen
88210129b7 make refunds work properly 2022-08-29 09:32:13 -06:00
Lee Salminen
7baec1de15 success_action was not defined, does not appear to be necessary for this 2022-08-29 09:05:00 -06:00
Lee Salminen
82904e509d Merge branch 'ext-boltcards-2' of github.com:leesalminen/lnbits-legend into ext-boltcards-2 2022-08-29 08:51:41 -06:00
Lee Salminen
fe83cad7a3 formatting 2022-08-29 08:51:32 -06:00
ben
d4da94e10b Merge remote-tracking branch 'leesalminen/ext-boltcards-2' into ext-boltcards-2 2022-08-29 15:51:32 +01:00
ben
56b4eb4a5e Added "lnurl://" to refund 2022-08-29 15:51:22 +01:00
Lee Salminen
6d9d037c06 add link to play store for bolt card app listing 2022-08-29 08:51:15 -06:00
Lee Salminen
b7c7b28dfc remove v-el:keybtn, was removed in vue v2. unnecessary ref anyways 2022-08-29 08:49:57 -06:00
Lee Salminen
51f9166744 define lnurlLink 2022-08-29 08:49:04 -06:00
ben
33f9ae9f66 Added some unique checks so only 1 record can be made per card 2022-08-29 15:37:31 +01:00
ben
7ea3830fed Added NFC to get UID 2022-08-29 15:11:25 +01:00
ben
7bfc0848ef Black/prettier 2022-08-29 14:18:18 +01:00
ben
17eeed48f5 Added pretty "add card" button 2022-08-28 12:29:27 +01:00
ben
6e9fd28d28 UI tidy 2022-08-28 12:16:23 +01:00
ben
8cabd7b5a4 withdraws working 2022-08-28 11:59:21 +01:00
ben
cb5c11fae4 Fixed enable 2022-08-28 11:05:26 +01:00
ben
977f9bb8c4 Added enable disable card 2022-08-28 10:58:17 +01:00
ben
20dbd879b1 bug 2022-08-27 17:26:17 +01:00
ben
5ba624761c Merge branch 'ext-boltcards-2' into bensbits 2022-08-27 16:41:16 +01:00
ben
99595ba96b Added refunds 2022-08-27 16:37:31 +01:00
ben
330a026379 Pretty much works 2022-08-26 19:22:03 +01:00
ben
c3870e65e3 Added UID scan for form 2022-08-25 14:17:03 +01:00
ben
4e8766ce08 removed uid for justa card id 2022-08-25 13:07:18 +01:00
ben
59d6b654c5 push before removing uuid 2022-08-24 09:33:38 +01:00
ben
c10f89e1d6 Boots, errors, needs work 2022-08-22 23:29:42 +01:00
ben
56c9234aff LNURLs handled internally
Has bugs
2022-08-22 22:33:20 +01:00
ben
4e68c114fd UI updated 2022-08-22 20:14:19 +01:00
ben
baf993f185 Merge remote-tracking branch 'origin/main' into ext-boltcards-2 2022-08-22 16:05:12 +01:00
Arc
ccc76d8ed1
Merge pull request #910 from motorina0/secure_communication
[onchain-ext] Secure communication
2022-08-22 14:13:55 +01:00
Vlad Stan
9bbcd28452 feat: UI improvements and fixes 2022-08-22 10:09:26 +03:00
Vlad Stan
d08b7455e7 feat: add passphrase support 2022-08-22 09:04:16 +03:00
Tiago Vasconcelos
1d55fe1d1a
add copy invoice button (#917) 2022-08-21 23:06:47 +02:00
Lee Salminen
a3f910acf4 additional validation 2022-08-21 13:17:44 -06:00
Lee Salminen
a6f0acc030 update readme 2022-08-21 10:31:47 -06:00
Lee Salminen
f6a301668b Revert "convert to using lnbits card id instead of card uid"
This reverts commit 971d8f34e8.
2022-08-21 10:30:25 -06:00
Lee Salminen
38ef4f3a78 Revert "surface the ID"
This reverts commit b11ddf3d61.
2022-08-21 10:30:10 -06:00
Lee Salminen
c4ffd45485 more readme 2022-08-21 10:19:34 -06:00
Lee Salminen
ec9005ffca add info about {card_id} in readme 2022-08-21 10:18:28 -06:00
Lee Salminen
b11ddf3d61 surface the ID 2022-08-21 10:06:39 -06:00
Lee Salminen
971d8f34e8 convert to using lnbits card id instead of card uid 2022-08-21 10:00:16 -06:00
Lee Salminen
a8bc3ea870 card_uid is always upper 2022-08-21 09:47:14 -06:00
Lee Salminen
f41c43cbf4 get the uid back into bytes 2022-08-21 09:09:01 -06:00
Lee Salminen
9dd7d30716 format 2022-08-21 09:02:20 -06:00
Lee Salminen
4242a82029 Add a secondary route with the card_uid appended to it. 2022-08-21 08:58:38 -06:00
Lee Salminen
db83d803f8 add .upper() to other side of the condition 2022-08-21 07:32:11 -06:00