-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atomic Swap app #110
Atomic Swap app #110
Conversation
* Added atomic swap app * Downgraded library versions * Added new activity for the atomic swap app * Added fragments to atomic swap activity with navigation * Extracted wallet stuff to separate, common library * Extracted wallet stuff to separate, common library (ethereum) * GUI for the swap wallet * Fixed improper package names * View model and binding for atomic swap wallet (Bitcoin wallet) * Global Ethereum wallet (TODO: not working GUI yet) * Fixed data binding for Bitcoin and Ethereum wallets * Fixed Ethereum wallet * Display Ethereum instead of Wei * Fixed saving wallet password and keys to shared preferences * Add functionality for creating and claiming btc swaps. * Fix warning * Added TransactionMonitor class * added ipv8 community communication code * renamed some references * added AtomicSwapCommunity and the view for it, fixed the build * Trying to test btcswap * comment out default peer and add local regnet * add callbacks to swap code. * Fixed could not find tx error. turns out I was hashing the hash twice. * Added an alert when trade offered received * Created the wallet holder class * Received an Accept message * FIx some issues with the scripts * Fix test * Cleanup test * minor UI updates * Add swap reclaiming and test for it. * Add eth swap contract and generate wrapper for it. * Create and broadcast a transaction, wait for confirmation and notify the recipient * Fix hashing hash twice. * Fixed using nullable variable * Fix some claim functionality and added test. * BTC and ETH nodes in Docker containers + README * Changed the peer address for regtest * Fixed mistake * Created a callback for recipient's transaction * Handle Complete message * Trade offers fragment * Handle Complete message * Swap fragment (WIP) * Send tx instead txId * fix swap * Added a dialog after the claim transaction gets confirmed * Swap fragment * Replaced transaction hash with transaction * Add fix for web3j not generating wrapper for payable fun. * Start listening to claimed transaction * Added code to extract the secret * Show a dialog when secret gets revealed * Listen for secret revealed transactions * Bind offerId to secret revealed listener * Remove entry from watched addresses * Fix swap contract and tested that claim and reclaim works. * Added logic for Bob to claim transaction * Added some comments * Broadcast trade offer on button click * Code cleanup * Connect UI for creating a swap with the logic * use correct amounts * Auxiliary scripts for adding money to the dev nodes * Get eth swap to work * added trade offers trade item rough design * added missing id and extracted string * fix typos * add logic for remote nodes. * Remove unused ipv8 code * Uncomment ethereum stuff. * Organized code into folders * add trustchain validation,accept * Trade offers fragment cleanup * Added logs to the swap contract. * Refactored trade offer item layout, added item renderer * Trade offers adapter and GUI cleanup * removed alert dialogs * Catch an exception * Add offset to message decoding * Add alert when swap complete * refctored createClaimTx * Check if it is BTC on accepting a trade * Create Trade class * Fix import error * Refactor ethereum swap * Make BitcoinSwap use the Trade class * Added setOnComplete message to Trade class * Refactored the BitcoinSwap class * Delete unused adapter * Change messages and Trade class to account for ethereum. * Fixed some bugs * Make the setters private in the Trade class * Fix app crash. * Fix trade id casting error * Add create swap function for eth. don't deploy the contract every time. * Got eth <-> swap to work. * Fix swap not working * Kotlin linter fixes * Add code for adding/removing offers to trade offers list * Trade offers attachment (#1) * Commonized trade lists and making trade logic into the activity * Attached trustchain community callbacks to the trade offers adapter * Accepting trade offer and marking it as in progress * Changing trade offer status after completion (not tested yet) * update contract address * Fixing list update * alice is also able to see her own transasction * Fixed list refreshing * Fixed problem with creating proposal block (serializing enums) * only remove trade offer if user was not involved in it * Disabling possibility of accepting the trade by its creator * fix remove trade message * Removing trade offer from the Alice side * Fixed marking trade as completed * Removed pop-ups * add eth config * Remove some dead code * Fix bitcoin tests. Co-authored-by: Konrad Ponichtera <konpon96@gmail.com> Co-authored-by: Ion Babalau <ionbabalau2020@gmail.com> Co-authored-by: Mariana Samardzic <marianasamardzic2@gmail.com> * Add readme * Update README.md * Update readme * Update readme * Update README.md * Run formatter * Update readme * Updated README of the atomic swap app, removed old IP addresses Co-authored-by: Rahim Klabér <rahimklaber2@gmail.com> Co-authored-by: Mariana Samardzic <marianasamardzic2@gmail.com> Co-authored-by: Dan Plamadeala <cornul11@gmail.com> Co-authored-by: Ion Babalau <ionbabalau2020@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi guys, overall code looks good. Some minor comments.
atomic-swap/src/main/java/nl/tudelft/trustchain/atomicswap/messages/CompleteSwapMessage.kt
Outdated
Show resolved
Hide resolved
atomic-swap/src/main/java/nl/tudelft/trustchain/atomicswap/messages/AcceptMessage.kt
Outdated
Show resolved
Hide resolved
atomic-swap/src/main/java/nl/tudelft/trustchain/atomicswap/community/AtomicSwapCommunity.kt
Outdated
Show resolved
Hide resolved
atomic-swap/src/main/java/nl/tudelft/trustchain/atomicswap/messages/InitiateMessage.kt
Outdated
Show resolved
Hide resolved
common-ethereum/src/test/java/nl/tudelft/trustchain/common/ethereum/WalletPasswordUtilsTest.kt
Outdated
Show resolved
Hide resolved
common/src/main/java/nl/tudelft/trustchain/common/bitcoin/WalletService.kt
Outdated
Show resolved
Hide resolved
@InvictusRMC Thanks for the review, I've made all the requested changes. |
I think you've missed a few. |
Should be good to go now. |
…ode removal, exception logging streamlined)
Yes, sorry for the confusion. We've went through the missed issues, all of them should be resolved now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the changes.
Closes Tribler/tribler#6774
@devos50 FYI
Added atomic swap app
Downgraded library versions
Added new activity for the atomic swap app
Added fragments to atomic swap activity with navigation
Extracted wallet stuff to separate, common library
Extracted wallet stuff to separate, common library (ethereum)
GUI for the swap wallet
Fixed improper package names
View model and binding for atomic swap wallet (Bitcoin wallet)
Global Ethereum wallet (TODO: not working GUI yet)
Fixed data binding for Bitcoin and Ethereum wallets
Fixed Ethereum wallet
Display Ethereum instead of Wei
Fixed saving wallet password and keys to shared preferences
Add functionality for creating and claiming btc swaps.
Fix warning
Added TransactionMonitor class
added ipv8 community communication code
renamed some references
added AtomicSwapCommunity and the view for it, fixed the build
Trying to test btcswap
comment out default peer and add local regnet
add callbacks to swap code.
Fixed could not find tx error. turns out I was hashing the hash twice.
Added an alert when trade offered received
Created the wallet holder class
Received an Accept message
FIx some issues with the scripts
Fix test
Cleanup test
minor UI updates
Add swap reclaiming and test for it.
Add eth swap contract and generate wrapper for it.
Create and broadcast a transaction, wait for confirmation and notify the recipient
Fix hashing hash twice.
Fixed using nullable variable
Fix some claim functionality and added test.
BTC and ETH nodes in Docker containers + README
Changed the peer address for regtest
Fixed mistake
Created a callback for recipient's transaction
Handle Complete message
Trade offers fragment
Handle Complete message
Swap fragment (WIP)
Send tx instead txId
fix swap
Added a dialog after the claim transaction gets confirmed
Swap fragment
Replaced transaction hash with transaction
Add fix for web3j not generating wrapper for payable fun.
Start listening to claimed transaction
Added code to extract the secret
Show a dialog when secret gets revealed
Listen for secret revealed transactions
Bind offerId to secret revealed listener
Remove entry from watched addresses
Fix swap contract and tested that claim and reclaim works.
Added logic for Bob to claim transaction
Added some comments
Broadcast trade offer on button click
Code cleanup
Connect UI for creating a swap with the logic
use correct amounts
Auxiliary scripts for adding money to the dev nodes
Get eth swap to work
added trade offers trade item rough design
added missing id and extracted string
fix typos
add logic for remote nodes.
Remove unused ipv8 code
Uncomment ethereum stuff.
Organized code into folders
add trustchain validation,accept
Trade offers fragment cleanup
Added logs to the swap contract.
Refactored trade offer item layout, added item renderer
Trade offers adapter and GUI cleanup
removed alert dialogs
Catch an exception
Add offset to message decoding
Add alert when swap complete
refctored createClaimTx
Check if it is BTC on accepting a trade
Create Trade class
Fix import error
Refactor ethereum swap
Make BitcoinSwap use the Trade class
Added setOnComplete message to Trade class
Refactored the BitcoinSwap class
Delete unused adapter
Change messages and Trade class to account for ethereum.
Fixed some bugs
Make the setters private in the Trade class
Fix app crash.
Fix trade id casting error
Add create swap function for eth. don't deploy the contract every time.
Got eth <-> swap to work.
Fix swap not working
Kotlin linter fixes
Add code for adding/removing offers to trade offers list
Trade offers attachment (Further clarification AppTutorial.md #1)
Commonized trade lists and making trade logic into the activity
Attached trustchain community callbacks to the trade offers adapter
Accepting trade offer and marking it as in progress
Changing trade offer status after completion (not tested yet)
update contract address
Fixing list update
alice is also able to see her own transasction
Fixed list refreshing
Fixed problem with creating proposal block (serializing enums)
only remove trade offer if user was not involved in it
Disabling possibility of accepting the trade by its creator
fix remove trade message
Removing trade offer from the Alice side
Fixed marking trade as completed
Removed pop-ups
add eth config
Remove some dead code
Fix bitcoin tests.
Co-authored-by: Konrad Ponichtera konpon96@gmail.com
Co-authored-by: Ion Babalau ionbabalau2020@gmail.com
Co-authored-by: Mariana Samardzic marianasamardzic2@gmail.com
Add readme
Update README.md
Update readme
Update readme
Update README.md
Run formatter
Update readme
Updated README of the atomic swap app, removed old IP addresses
Co-authored-by: Rahim Klabér rahimklaber2@gmail.com
Co-authored-by: Mariana Samardzic marianasamardzic2@gmail.com
Co-authored-by: Dan Plamadeala cornul11@gmail.com
Co-authored-by: Ion Babalau ionbabalau2020@gmail.com