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.
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
feat(nft-swap): complete refund methods #2129
feat(nft-swap): complete refund methods #2129
Changes from 102 commits
394fe4d
44f542d
ff1006a
aebf756
1966fcf
1922bff
c07e8e2
ebac6e6
f9f4eab
ad0ce31
4a4dfc0
c703913
fe498fa
18fa53e
b9a6719
9a23f20
998708b
364d795
cb187c7
9d4e3ee
495e7a9
e917b0b
f868a50
e94fac7
2e8c662
0fbf75d
03860e1
b8b05d1
3de2b92
f2625fd
930a593
350abd6
36eaf38
4478ccb
7882e6e
d03b6d1
ff92a20
a2c47f8
d6cbfd8
9c3ff07
0bedba3
7976761
a6ad6fc
5daf723
2daec7a
6992931
3f07f1f
0079362
0c164fb
63af2bc
e2f8ccf
dad6988
9b1a700
fc4d6e4
cc8e78e
87b297a
780b1e8
f789e91
aa1d70f
b9f2a98
ece5152
920861e
e478711
9803fd5
2828be0
04d99e4
d31566d
4064999
b986279
e636da1
40ffb65
888108c
8143cc2
b391a16
5f34f1c
e672485
986c5e7
d998062
ff4d306
2ae0b04
0d54567
602206d
604d182
36d94b9
ce6673b
933d4b9
1e90600
b9049bf
8e4cd71
4e9f902
801a688
1e050d2
2447763
fa3f553
eddeb1a
7cbb941
87cc404
191b5f0
734edbc
7b69886
b13ab34
dab5bd9
cac2d0d
071a1f6
439243a
c629d7a
ed08df9
89e543f
28bc18a
69a07a8
7570df7
3042e60
e1e2242
fcd394d
6a231a3
c58808a
1a5bf73
5d6f943
2007a70
9aca0d7
fe730fa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It's fine to do that at this stage as we discussed before. We might even leave it like that in the future (only drawback is some unneeded p2p messages are exchanged), but I might implement the state machine conditional logic for smart contract based chain/coins myself in the future as I have some ideas on how to do that in a good way, it will be either:
1 - Just adding if conditions to bypass some code execution and p2p messages sending/handling from both sides of the swap.
2 - More generic implementation, but this can get messy as well.
3- Extending storable state machine to be a conditional state machine with state transitions depending on specific conditions, but it can make it much more complex to understand.
Just thinking out loud here :)
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.
I was thinking to add
has_preimage:bool
flag in coin to skip unneeded p2p messages, I just didnt want to leave unimplemented in functions. We can keep some simple logic here.Yep, we can not to add if checks at the beginning and firstly test Utxo-Eth swaps as they are.
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.
Agreed.
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.
Same comment as the above here.
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.
Related to this #2093 (comment) , we can look into it in next PRs. We should try to use same format across HD wallet and external ones so that a swap can be continued from either if started from the other one (if both have the same mnemonic / seed and address_id)
c.c. @borngraced If we will not extract a pubkey from walletconnect / external wallet for EVM and we use Address hash after the
0x
, then we should do the same here and address can still be derived from this hash by adding0x
to access contract functions.