74 Commits

Author SHA1 Message Date
ekzyis
2af23ff409 Fix @vue/cli-plugin-babel missing 2023-11-07 09:06:37 +01:00
ekzyis
4e343d49d0 implement login with vue
* use vue router
* use pinia
* use tailwindcss
* use vite
* transform /api/login and /api/login/callback into JSON APIs
* add Access-Control-Allow-Credentials header
* add TODO about JSON errors
2023-11-07 09:06:35 +01:00
ekzyis
d1b7786434 Add vue frontend 2023-11-04 00:33:27 +01:00
ekzyis
9a87fe7342 Rename to HandleInvoiceStatus 2023-11-03 23:43:56 +01:00
ekzyis
edfbd2cc92 Test logout 2023-11-03 23:38:23 +01:00
ekzyis
18107bdac8 Only test handler package and use -v
since there are only tests in the handler package so far
2023-11-03 23:00:11 +01:00
ekzyis
e2a09ccdd1 refactor: put test hooks and boilerplate into own package 2023-11-03 21:17:04 +01:00
ekzyis
7a5c2cb063 Disable test cache 2023-11-03 20:35:34 +01:00
ekzyis
fc6fb9914e Test login + callback 2023-11-03 20:34:21 +01:00
ekzyis
c66e96bf3f refactor: fix init and use DI
* fix init misuse which makes running tests impossible since tests are run inside a temporary test directory which breaks env loading

* use dependency injection pattern for server creation and global server context in route handlers
2023-11-03 20:34:21 +01:00
ekzyis
50244ee9ca Update HTML and CSS 2023-09-14 01:15:30 +02:00
ekzyis
7558655458 refactor: Structure code into different packages
I have put too much code into the same files.

Also, I put everything into the same package: main.

This package is only meant for executables.

Therefore, I have refactored my code to use multiple packages. These packages also guarantee separation of concerns since Golang doesn't allow cyclic imports.
2023-09-10 23:13:08 +02:00
ekzyis
b4a8adcb9a Fix expiry greater than maxExpiry 2023-09-09 22:52:51 +02:00
ekzyis
6c111501ec Show server logs in hotreload script output 2023-09-09 22:52:51 +02:00
ekzyis
057690d5a9 Use HODL invoices 2023-09-09 22:52:51 +02:00
ekzyis
2d2ceec140 Fix table in MATCHMAKING.md 2023-09-09 22:52:51 +02:00
ekzyis
e34b5826fa Remove hidden attr from order form 2023-09-09 22:52:51 +02:00
ekzyis
b2fe9b03d7 Use 405 Method Not Allowed if no LND connection exists 2023-09-09 22:52:51 +02:00
ekzyis
ab2c80c6e8 Start goroutine to check invoice when serving 2023-09-09 22:52:51 +02:00
ekzyis
82f6f9698e Fix ReferenceError 2023-09-09 22:52:51 +02:00
ekzyis
3092a3f89d Remove order_id, add created_at column 2023-09-09 22:52:51 +02:00
ekzyis
de42a7435b Use as unit symbol 2023-09-09 22:52:51 +02:00
ekzyis
a01d4488cc Render or poll invoice status 2023-09-09 22:52:51 +02:00
ekzyis
b2c7f28200 Run CheckInvoice jobs on startup 2023-09-09 22:52:51 +02:00
ekzyis
d987934ba4 Add user page 2023-09-09 22:52:51 +02:00
ekzyis
e6aec21aff Add share pointer to type Order 2023-09-09 22:52:51 +02:00
ekzyis
b8a759b141 hotreload: don't die on build errors 2023-09-09 22:52:51 +02:00
ekzyis
e5f5759871 Redirect after payment 2023-09-09 22:52:51 +02:00
ekzyis
921623ee4d Respond with 402 Payment Required 2023-09-09 22:52:51 +02:00
ekzyis
798f5b3623 Move QR code into lib.go 2023-09-09 22:52:51 +02:00
ekzyis
00bcde7ea8 Remove unused order.css 2023-09-09 22:52:51 +02:00
ekzyis
f09beb1a4a Implement POST /market/:id/order 2023-09-09 22:52:51 +02:00
ekzyis
9b40d9f031 Add MATCHMAKING.md 2023-09-09 22:52:51 +02:00
ekzyis
c948d7babf Use collapsibles 2023-09-09 22:52:51 +02:00
ekzyis
76309c4153 Show order book + focus on binary market 2023-09-09 22:52:51 +02:00
ekzyis
8eecf1a981 Drop column funding 2023-09-09 22:52:51 +02:00
ekzyis
c2a8968120 Refactor router code 2023-09-09 22:52:51 +02:00
ekzyis
04ce96069b Add order page 2023-09-09 22:52:50 +02:00
ekzyis
58901e8d7e Toggle form 2023-09-09 22:52:50 +02:00
ekzyis
ce4c495052 Add debounce logic 2023-09-09 22:52:50 +02:00
ekzyis
bbe831bf03 Refactor bmarket.js 2023-09-09 22:52:50 +02:00
ekzyis
5ffc35a94f Rename to bmarket 2023-09-09 22:52:50 +02:00
ekzyis
e14a3c824d Format HTML 2023-09-09 22:52:50 +02:00
ekzyis
011b2eff0a Move HTML to pages/ 2023-09-09 22:52:50 +02:00
ekzyis
23aaa0a438 Add market.js 2023-09-09 22:52:50 +02:00
ekzyis
bf8717e2b1 Add hot reload for development 2023-09-09 22:52:50 +02:00
ekzyis
655ccb4a9b Create README + Makefile 2023-09-09 22:52:50 +02:00
ekzyis
7094438152 Use cost function
With this cost function, buying and selling is a lot easier since it uses the same function.

Also, shares are now always integers which is also easier to grasp.

Reference: http://blog.oddhead.com/2006/10/30/implementing-hansons-market-maker/
2023-09-09 22:52:50 +02:00
ekzyis
87ce57c862 Add binary market page 2023-09-09 22:52:50 +02:00
ekzyis
fbab0b4975 Add PUBLIC_URL env var 2023-09-09 22:52:50 +02:00