Skip to content
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

eth: supplement eth swap receipt #1464

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Feb 2, 2022

Further work on #1311

This supplements the swapRecipt String method with the contract address, which in addition to the secret hash makes performing a manual refund more straightforward.

This also omits the raw refund transaction logging in (*Core).swapMatchGroup when the Receipt.SignedRefund provides no such data, as is the case with ETH. The swap Receipt's Stringer is still used here to log the secret hash and contract address for ETH swapReceipts.

txHash: txHash,
secretHash: secretHash,
ver: swaps.AssetVersion,
contractAddr: dexeth.ContractAddresses[swaps.AssetVersion][eth.net].String(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also give ethFetcher (eth.node) a contractAddr method...

Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[INF] CORE: Broadcasted transaction with 1 swap contracts for order d0b2f897fc9a9710e62c9f34704a07392355d8670106db7601e3212db9f56154. Assigned fee rate = 1. Receipts (eth): [{ tx hash: 2908851c46882fa5d1c01aa6d1300edc0be497160517178580e13fe10a51f9ed, contract address: 0x2f68E723b8989BA1C6a9F03E42F33cb7Dc9D606f, secret hash: abc8dd390f2c827d44a64993075a8b64ca76df02429e04ace5a9f37286b34cf0 }].

client/asset/eth/eth.go Outdated Show resolved Hide resolved
This supplements the swapRecipt String method with the contract address,
which in addition to the secret hash makes performing a manual refund
more straightforward.

This also omits the raw refund transaction logging in
(*Core).swapMatchGroup when the Receipt.SignedRefund provides no such
data, as is the case with ETH.
The swap Receipt's Stringer is still used here to log the secret hash
and contract address for ETH swapReceipts.
@chappjc chappjc merged commit 020ff9b into decred:master Feb 8, 2022
@chappjc chappjc deleted the no-signed-refund branch February 8, 2022 17:01
@chappjc chappjc added this to the 0.5 milestone Apr 21, 2022
@chappjc chappjc added the ETH label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants