-
Notifications
You must be signed in to change notification settings - Fork 318
implement-payjoin #1949
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
Merged
Merged
implement-payjoin #1949
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
d62b420
Initial Payjoin
konstantinullrich 1f916e7
Initial Payjoin
konstantinullrich d48bab6
More payjoin stuff
konstantinullrich b354d43
Minor fixes
konstantinullrich 808bb44
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 9866e69
Minor fixes
konstantinullrich 27eb0a7
Minor cleanup
konstantinullrich ba163ff
Minor cleanup
konstantinullrich 6c9e99e
Minor cleanup
konstantinullrich a9a3043
Minor cleanup
konstantinullrich 70843b4
Minor cleanup
konstantinullrich 9d2c60a
Minor cleanup
konstantinullrich 5c12d89
Fix minor bug causes by data inconsistency in the btc utxos
konstantinullrich 0ebda53
Minor cleanup
konstantinullrich 932eea3
Minor cleanup
konstantinullrich e34616a
Minor cleanup
konstantinullrich 1b5faaf
Minor cleanup
konstantinullrich 64fa393
Initial Payjoin
konstantinullrich 669c4af
Initial Payjoin
konstantinullrich 700a2ed
More payjoin stuff
konstantinullrich 451c8f4
Minor fixes
konstantinullrich f8807d7
Minor fixes
konstantinullrich 91a480e
Minor cleanup
konstantinullrich b049a01
Minor cleanup
konstantinullrich bd410c2
Minor cleanup
konstantinullrich abcb9f7
Minor cleanup
konstantinullrich dd06864
Minor cleanup
konstantinullrich 986d3b4
Minor cleanup
konstantinullrich 910b58d
Fix minor bug causes by data inconsistency in the btc utxos
konstantinullrich 856ad8d
Minor cleanup
konstantinullrich 677c8e5
Minor cleanup
konstantinullrich eac63dc
Minor cleanup
konstantinullrich 1e5fa42
Minor cleanup
konstantinullrich 28a6641
Merge remote-tracking branch 'origin/implement-payjoin' into implemen…
konstantinullrich 705664c
Fix Rebase issues
konstantinullrich cdd3b17
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 11f87a5
Move PJ Receiver to isolate
konstantinullrich 4c4fd8e
Add Payjoin Setting
konstantinullrich 8f4dad9
Payjoin Sender are now isolated
konstantinullrich 421364e
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 406ac21
Added Payjoin sessions to tx overview. Fix Fee issue with payjoin
konstantinullrich a4093cf
Clean up code
konstantinullrich 42e9bc1
Fix taproot for payjoin
konstantinullrich 596de98
Fix CI Errors
konstantinullrich efc8fd3
Merge branch 'main' into implement-payjoin
konstantinullrich 7dfa57d
Add Payjoin UI elements and details page
konstantinullrich 16400ed
Add Payjoin UI elements and details page
konstantinullrich 45899b8
Fix Translations
konstantinullrich 0f13ea7
feat: Detect Payjoin URIs in pasted text and show to the User sending…
konstantinullrich 56fcdf6
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 04147a5
feat: rename pjUri to payjoinURI for more code clarity
konstantinullrich 8d96682
Update res/values/strings_pl.arb
OmarHatem28 bc07860
Update cw_bitcoin/lib/payjoin/manager.dart
OmarHatem28 5abd070
Update cw_bitcoin/lib/payjoin/manager.dart
OmarHatem28 dad1404
Merge branch 'main' into implement-payjoin
OmarHatem28 7a56e28
feat: Disable Payjoin per default
konstantinullrich 016fdad
feat: Disable Payjoin fully if disabled or no Inputs available
konstantinullrich 19079ff
feat: Resume Payjoin if app comes back to foreground
konstantinullrich 41145e1
chore: Revert overly aggressive code formats
konstantinullrich c879647
feat: show correct Payjoin amount for receivers
konstantinullrich 086d30c
feat: Improved payjoin status
konstantinullrich df345ec
feat: Show payjoin errors on payjoin details screen
konstantinullrich d9c9db2
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 85464f4
deps: update flutter to 3.27.4
MrCyjaneK 1dadf33
Merge branch 'main' into implement-payjoin
konstantinullrich 66778d8
feat: Revert localisations
konstantinullrich cc87b70
Merge branch 'main' into implement-payjoin
konstantinullrich c05a248
bug: Remove duplicate transaction id on payjoin details
konstantinullrich 9c27c67
Merge branch 'main' into implement-payjoin
konstantinullrich 1badf98
style: remove double await in payjoin sender
konstantinullrich 9a25444
refactor(cw_bitcoin): Refactor method signatures and convert construc…
konstantinullrich c55f984
refactor(cw_bitcoin): Refactor wallet service and PSBT signer for cle…
konstantinullrich e4daab5
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich ff1ee19
fix: Resume Payjoin Sessions and load PJUri after sleep
konstantinullrich 15743d3
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 16d7940
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich 220fe9d
feat: Add "Copy Payjoin URL button" to receive screen
konstantinullrich 65bbdaa
fix: Add "Payjoin enabled"-Box below QR Code on the receive screen
konstantinullrich 07cf416
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich da47255
fix: Set payjoin_enabled color to black independent of the theme
konstantinullrich b3c0e4c
refactor: Payjoin session management and cleanup unused code.
konstantinullrich b9cdb57
Merge branch 'refs/heads/main' into implement-payjoin
konstantinullrich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,22 +2,36 @@ import 'package:bitcoin_base/bitcoin_base.dart'; | |
|
|
||
| String addressFromOutputScript(Script script, BasedUtxoNetwork network) { | ||
| try { | ||
| switch (script.getAddressType()) { | ||
| case P2pkhAddressType.p2pkh: | ||
| return P2pkhAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| case P2shAddressType.p2pkInP2sh: | ||
| return P2shAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| case SegwitAddresType.p2wpkh: | ||
| return P2wpkhAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| case P2shAddressType.p2pkhInP2sh: | ||
| return P2shAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| case SegwitAddresType.p2wsh: | ||
| return P2wshAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| case SegwitAddresType.p2tr: | ||
| return P2trAddress.fromScriptPubkey(script: script).toAddress(network); | ||
| default: | ||
| } | ||
| return addressFromScript(script, network).toAddress(network); | ||
| } catch (_) {} | ||
|
|
||
| return ''; | ||
| } | ||
|
|
||
| BitcoinBaseAddress addressFromScript(Script script, | ||
| [BasedUtxoNetwork network = BitcoinNetwork.mainnet]) { | ||
| final addressType = script.getAddressType(); | ||
| if (addressType == null) { | ||
| throw ArgumentError("Invalid script"); | ||
| } | ||
|
|
||
| switch (addressType) { | ||
| case P2pkhAddressType.p2pkh: | ||
| return P2pkhAddress.fromScriptPubkey( | ||
| script: script, network: BitcoinNetwork.mainnet); | ||
| case P2shAddressType.p2pkhInP2sh: | ||
| return P2shAddress.fromScriptPubkey( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should also have |
||
| script: script, network: BitcoinNetwork.mainnet); | ||
| case SegwitAddresType.p2wpkh: | ||
| return P2wpkhAddress.fromScriptPubkey( | ||
| script: script, network: BitcoinNetwork.mainnet); | ||
| case SegwitAddresType.p2wsh: | ||
| return P2wshAddress.fromScriptPubkey( | ||
| script: script, network: BitcoinNetwork.mainnet); | ||
| case SegwitAddresType.p2tr: | ||
| return P2trAddress.fromScriptPubkey( | ||
| script: script, network: BitcoinNetwork.mainnet); | ||
| } | ||
|
|
||
| throw ArgumentError("Invalid script"); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.