Commit graph

109 commits

Author SHA1 Message Date
Jonathan Zernik
fef9625592
Got itest working (#904) 2021-08-10 20:57:59 -07:00
Jonathan Zernik
7d266cdf5e
Split peer server client (#901)
* Split peer server and peer client

* Got itest passing

* Catch exception when closing peer socket

* Reconfigure all itests to run
2021-08-10 02:16:46 -07:00
Jonathan Zernik
f652915355
Use tcp peer connection (#900)
* Got basic tcp connection working

* Got passing itest for open tcp connection

* Got most of protocol working. still need to send offer correctly

* Got offer from peer over tcp connectrion

* Got single squeak download working on tcp connection

* Remove rpc peer client

* Remove old rpc clients

* Remove old squeak client modules

* Got sharesqueaks peer message working

* Remove peer rpc server

* Remove server rpc fixtures

* Remove old itests

* Remove old sync modules

* Run worker background task to keep peers synced

* Add peer connection worker

* Add test for disconnect peer

* Remove old itest util

* Delete old peer rpc client helpers.

* Handle insert duplicate received offer

* Use more specific exception handling for duplicate offer insert
2021-07-09 21:07:46 -07:00
Jonathan Zernik
b935785469
Use timestamp for like field (#896)
* Use a timestamp for like field in database

* Use query to get liked squeaks in order of like
2021-06-04 18:28:42 -07:00
Jonathan Zernik
6a71bf5129
Add liked column (#878)
* Add liked column to squeak table

* Add rpc methods for like and unlike

* Fix migration to add liked column

* Got like squeak working

* Set squeak liked without reloading page

* Download squeak button reloads squeak without reloading page

* Use inconbutton for actions in squeak detail component

* Update static build
2021-02-22 18:54:20 -08:00
Jonathan Zernik
a93025a026
Save host and port of buyer client (#868)
* Save host and port of buyer client

* Show buyer port in frontend for received payments
2021-02-21 20:01:02 -08:00
Jonathan Zernik
4f1272cc26
Add more type hints controller (#843)
* Use more type hints in controller

* Add type hints for squeak entry detail and sent offer
2021-02-13 09:09:04 -08:00
Jonathan Zernik
791b76bd1b
Use single method to save squeak in controller (#834)
* Use single save_squeak method in controller

* Remove new lines from save_squeak method

* Add separate methods for save uploaded, downloaded, created squeak

* Simplify insert squeak method in database

* Add TODO comment for insert squeak method

* Improve code style of parse squeak entry method

* Add itest for failed upload without decryption key
2021-02-13 04:13:11 -08:00
Jonathan Zernik
5604cae842
Use block height for rate limiter (#832)
* Use block height for checking rate limiter limit

* Use block height for rate limiter limit count

* Remove print post squeak exception from itest
2021-02-13 02:35:22 -08:00
Jonathan Zernik
9e15962d1a
Allow reprocess invoice without duplicate (#816)
* Allow reprocessing the same invoice without duplicate insert of received payment

* Use stopped event to stop processing invoices

* Got itest working with payment processor class

* Use payment processor class in squeak controller constructor

* Add rpc method for reprocess received payments

* Add reprocess received payments button

* Add reprocess received payments to admin web app

* Handle processing received payments subscription rpc better

* Add frontend button to reprocess received payments

* Clear settle indices in reprocess received payments

* Update static build
2021-02-12 00:14:45 -08:00
Jonathan Zernik
c8072a0c25
Tear down itest fixtures after yield (#789) 2021-02-06 01:40:25 -08:00
Jonathan Zernik
387aa13893
Use autoincrement for primary keys (#788)
* Change db model to use bigint with autoincrement

* Add constraint on host and port in peer table

* Use autoincrement in database model
2021-02-06 01:24:31 -08:00
yzernik
aaf6ae975d Revert changes to use natural primary keys 2021-02-04 03:15:02 -08:00
Jonathan Zernik
64cf97dfe9
Try changing peer primary key to hash, not done (#782)
* Try changing peer primary key to hash, not done

* Got backend working with peer hash as primary key

* Got frontend working with peer hash as primary key for peer
2021-02-04 00:09:58 -08:00
yzernik
ebd61823aa Revert back the revert to use address for profile primary key 2021-02-03 20:53:00 -08:00
Jonathan Zernik
855d357ca4
Revert to using integer primary key for profile table (#783) 2021-02-03 01:42:47 -08:00
Jonathan Zernik
7c5734bd86
Use addresss for profile primary key (#779)
* Use address as primary key for profile table

* Delete old sql query comments

* Update frontend to use address for profile primary key

* Fix profiles page data table goto action

* Fix usage of get profile by address in remaining frontend
2021-02-02 20:54:11 -08:00
Jonathan Zernik
7a6a9477ee
Use default name when empty (#774)
* Disallow empty name for contact profile

* Disallow empty name for signing profile

* Disallow empty name for peer
2021-01-31 23:34:42 -08:00
Jonathan Zernik
a07e73faa4
Use nested profile msg in squeak display msg (#767)
* Use nested squeak profile msg inside squeak display entry in rpc proto

* Include author address in squeak display entry msg

* Use nested squeak profile in squeak display message in frontend

* Update static build with nested squeak profile in squeak display msg
2021-01-30 21:29:57 -08:00
Jonathan Zernik
d0fc4d5c73
Add update profile image dialog (#752)
* Added update profile dialog

* Add select file input for image upload

* Add set and clear profile image rpc methods

* Remove unused bytes field from clear image rpc

* Display selected file name in upload image dialog

* Set profile image rpc uses base64 string field

* Got set profile image working

* Show profile image in timeline

* Update static build with update custom profile image working
2021-01-29 22:01:32 -08:00
Jonathan Zernik
c4ae0835f4
Include network in peer rpc methods (#749) 2021-01-29 17:46:13 -08:00
Jonathan Zernik
627acea07c
Add custom profile image (#745)
* Add profile image field to db

* Add set profile image rpc

* Got clear profile image working

* Add has custom profile image field in profile rpc respones
2021-01-29 01:27:59 -08:00
Jonathan Zernik
930c1ff20c
Show custom user avatar (#740)
* Use material avatar in timeline avatar

* Load default profile image from static file

* Include base64 image in squeak display entry response

* Got default profile image working
2021-01-28 22:37:55 -08:00
Jonathan Zernik
555d6eea61
Add get payment summary rpc (#704)
* Get received payment summary rpc

* Rename get received payment summary function

* Get sent payment summary in rpc

* Add itest case for sent payment summary

* Add web endpoint for get payment summary

* Remove old fields from received payment summary
2021-01-25 21:06:48 -08:00
Jonathan Zernik
af7de6483a
Add rename peer rpc method (#683)
* Add rename peer rpc method

* Add web endpoint for rename peer
2021-01-24 17:41:53 -08:00
Jonathan Zernik
83c0b295e9
Add rename profile rpc method (#682)
* Add rpc method to rename profile

* Add web endpoint for rename profile
2021-01-24 16:53:09 -08:00
Jonathan Zernik
edc2d4175b
Fix sync single squeak (#676) 2021-01-22 22:00:20 -08:00
Jonathan Zernik
dbff72ec57
Add replies display rpc method (#674)
* Add get replies display entries rpc method

* Add assertion for get replies test case

* Show replies in squeak page

* Show replies in frontend
2021-01-22 18:32:05 -08:00
Jonathan Zernik
0bb54f1958
Use time_s for payment times (#673)
* Use time_s for payment times

* Update static build
2021-01-21 22:21:38 -08:00
Jonathan Zernik
5d31ca3689
Add valid column to sent payment table (#670)
* Add valid column to sent payment table

* Show valid field in sent payments frontend
2021-01-21 20:18:04 -08:00
Jonathan Zernik
dc04f75160
Add import signing profile (#666)
* Add rpc method to import signing profile

* Got import signing profile working
2021-01-20 12:44:04 -08:00
Jonathan Zernik
4b0f3bc637
Add rpc method to get private key (#664)
* Add rpc method to get private key

* Add export private key to frontend
2021-01-20 11:41:02 -08:00
Jonathan Zernik
4ad3232325
Rename get post squeak rpc methods (#659)
* Rename download squeak rpc method

* Fix name of upload squeak rpc method

* Rename download squeak rpc method

* Rename download offer peer rpc method

* Fix comments in peer rpc server proto

* Rename methods in peer client.
2021-01-14 21:32:55 -08:00
Jonathan Zernik
1d4baaa5fa
Redo peer protocol (#658)
* Add lookup squeaks to download peer rpc method

* Added peer rpc method for lookup squeaks to upload

* Got itest passing with new peer rpc

* Fix upload lookup method in peer server servicer
2021-01-14 20:38:38 -08:00
Jonathan Zernik
41278868bd
Create base class network sync (#639)
* itest passing with refactored peer sync

* Fix query for downloading peers

* Delete old network sync

* Revert "Delete old network sync"

This reverts commit 91d5620129.

* Delete old network sync
2021-01-13 17:41:50 -08:00
Jonathan Zernik
5572ee07d0
Use bytes for server proto (#626)
* Use bytes for squeak_hash in getsqueak method

* Use bytes for squeak hash in get offer rpc

* Use bytes for hash field in squeak message in proto

* Use bytes for hashes in lookup response

* Remove old commented code

* Use bytes for squeak hash in peer client post

* Remove old comments
2021-01-12 19:13:40 -08:00
Jonathan Zernik
1414c2163f
Delete sent offer and received offer after payment (#601)
* Delete sent offer and received offer after payment

* Fix itest for deleted offers after payment
2021-01-11 11:34:49 -08:00
Jonathan Zernik
59c73c85b3
Add get network rpc method (#563) 2021-01-05 14:37:20 -08:00
Jonathan Zernik
22f6b4fc3c
Add precommit hooks (#526) 2020-12-28 23:52:32 -08:00
Jonathan Zernik
293cbc4db5
Got all flake8 checks passing (#514)
* Got all flake8 checks passing

* Remove reorder imports from codecheck tox env
2020-12-26 04:56:46 -08:00
Jonathan Zernik
62f21874f1
Autoformat python code with tox command (#510) 2020-12-26 02:01:22 -08:00
Jonathan Zernik
00fc72514f
Use squeaklib with ptlc (#502)
* Rename secret_key

* More work to convert to using PTLC

* Updated most code for PTLC

* More work to use ptlc with secret key

* Got itest passing

* Remove unused import

* Use version 0.5.0 of squeaklib

* Added simple unit test for squeak controller

* Use modular addition subtraction for secret key nonce tweak

* Move util to core folder

* Store secret key as hex in database

* Store nonce as hex in db
2020-12-25 20:17:54 -08:00
Jonathan Zernik
d25a56ccb1
Subscribe received payments (#471)
* Got subscribe received payments working

* Add test for subscribe received payments
2020-11-21 03:30:45 -05:00
Jonathan Zernik
c5e5889135
Rename get timeline squeak displays (#469)
* Rename get timeline squeak displays and don't filter for following

* Update static build
2020-11-20 23:26:14 -05:00
Jonathan Zernik
0c072ae470
Include client_addr in sent_offer and received_payment tables (#458) 2020-11-13 04:29:20 -05:00
Jonathan Zernik
4e17c4611d
Make fields nullable false in models (#456) 2020-11-13 00:42:28 -05:00
Jonathan Zernik
2c8d6e0df5
Fix timestamp in get received payments (#453)
* Fix timestamp in get received payment rpc

* Update static build

* Fix proto numbering of received payment

* Include log line with returned received payments

* Lg the received payments reply

* Lg received payments reply list

* Lg received payments reply list

* Fix received payment component

* Remove log lines from frontend

* Remove log lines for received payment
2020-11-12 14:04:28 -05:00
Jonathan Zernik
1d68e0b569
Add sent offer table (#451)
* Rename received payments to sent offers

* Add received payments table

* Add get received payments rpc method

* Rename old received payment to sent offer in frontend

* Add received payment frontend component

* Improve logging of error in admin web request
2020-11-12 04:02:28 -05:00
Jonathan Zernik
2f8d718518
Add received payments worker (#450)
* Got subscribe invoices worker working

* Improve error message in lnd invoice worker

* Only mark received payments if paid if the invoice is settled

* Check if invoice is settled before marking received payment as paid

* Pass settle index as param to mark paid db method

* Add migration to include settle_index in sent payments table

* Got latest settle index query working, I think

* Only return received payments that are already paid in db query

* Remove unused column from get latest settle index query

* Update static build
2020-11-11 22:02:26 -05:00
Jonathan Zernik
0dde62bf46
Add received payments table and get it in rpc method (#443) 2020-11-11 03:04:09 -05:00