DRAFT push payjoin details to transaction model #372
+38
−18
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.
This is a draft attempt (IDEK WHAT I'M DOING IN FLUTTER) to move data from some of these isolated processes into the main wallet history data structures.
I don't it make sense to push completed transactions to the success screen, because payjoin is async. A sender should have the originalPsbt to pass to the success screen before entering spawnSender, and it will await a response from the sender with a payjoinPsbt to tupdate the transaction with.
A receiver should have an unsigned payjoinPsbt that it can listen for in mempool.
the transaction from an isolate is going to have to be passed as an event. That should propagate into the Transaction model and history. Then the network fees of each contributor can be calculated by taking the difference between originalPsbt and payjoinPsbt