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

Implement prepare_refund() #548

Merged

Conversation

danielgranhao
Copy link
Contributor

@danielgranhao danielgranhao commented Oct 23, 2023

Addresses #526.

@danielgranhao danielgranhao force-pushed the 23-20-2023-implement-prepare-refund branch 3 times, most recently from af59cfe to 129da31 Compare October 23, 2023 17:11
@danielgranhao danielgranhao marked this pull request as ready for review October 23, 2023 18:26
Copy link
Member

@roeierez roeierez left a comment

Choose a reason for hiding this comment

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

Thanks a lot, looks good!
Can you please make sure the RN generator code is done with the latest RN generator? We yesterday updated it.

Comment on lines 441 to 450
let swap_info = self
.persister
.get_swap_info_by_address(req.swap_address.clone())?
.ok_or_else(|| anyhow!(format!("swap address {} was not found", req.swap_address)))?;

let transactions = self
.chain_service
.address_transactions(req.swap_address.clone())
.await?;
let utxos = get_utxos(req.swap_address, transactions)?;
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we can extract out this code to a function that can be reused in refund_swap function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Addressed in a2308ba

@danielgranhao danielgranhao force-pushed the 23-20-2023-implement-prepare-refund branch from 129da31 to a2308ba Compare October 24, 2023 10:57
@danielgranhao
Copy link
Contributor Author

@roeierez

Can you please make sure the RN generator code is done with the latest RN generator? We yesterday updated it.

I've just rebased and run the generator again. I didn't see any changes.

Copy link
Collaborator

@dangeross dangeross left a comment

Choose a reason for hiding this comment

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

RN codegen looks good

Copy link
Member

@roeierez roeierez left a comment

Choose a reason for hiding this comment

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

Looks great!

@roeierez
Copy link
Member

@danielgranhao this is ready to be merged. We will merge it right after the conflict is resolved. Thanks.

@danielgranhao danielgranhao force-pushed the 23-20-2023-implement-prepare-refund branch from a2308ba to ee2f2fa Compare October 25, 2023 13:25
* Created `get_address_utxos`
* Created `get_swap_info_ok`
@danielgranhao danielgranhao force-pushed the 23-20-2023-implement-prepare-refund branch from ee2f2fa to 88207b5 Compare October 25, 2023 14:46
@danielgranhao
Copy link
Contributor Author

@roeierez Conflicts should be resolved now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants