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

transfer (total escrow): add escrow / unescrow functions #3507

Merged
merged 7 commits into from
May 3, 2023

Conversation

crodriguezvega
Copy link
Contributor

@crodriguezvega crodriguezvega commented Apr 22, 2023

Description

ref: #3368

Commit Message / Changelog Entry

N/A

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2023

Codecov Report

Merging #3507 (63cbe67) into main (87ac1a9) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3507      +/-   ##
==========================================
- Coverage   78.78%   78.77%   -0.01%     
==========================================
  Files         182      182              
  Lines       12687    12686       -1     
==========================================
- Hits         9995     9994       -1     
  Misses       2261     2261              
  Partials      431      431              
Impacted Files Coverage Δ
modules/apps/transfer/keeper/relay.go 90.94% <100.00%> (-0.04%) ⬇️

@crodriguezvega crodriguezvega changed the title transfer: add escrow / unescrow functions transfer (total escrow): add escrow / unescrow functions Apr 23, 2023
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

LGTM, I added a little more code documentation

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

should these target the feat/total-escrow-state-entry branch?

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Nice, love this clean up!

Comment on lines 372 to 374
if err := k.bankKeeper.SendCoins(
ctx, sender, escrowAddress, sdk.NewCoins(token),
); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

nit; I think we should put this on one line similarly to below in unescrowToken

Copy link
Contributor

@colin-axner colin-axner May 3, 2023

Choose a reason for hiding this comment

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

I thought about the same, agreed! I think it helps to make the functions as identical as possible

@colin-axner
Copy link
Contributor

should these target the feat/total-escrow-state-entry branch?

No, since this is just code-hygenie/readability, I think it makes sense not to backport

@colin-axner colin-axner enabled auto-merge (squash) May 3, 2023 09:25
@colin-axner colin-axner merged commit 9ebc2f8 into main May 3, 2023
@colin-axner colin-axner deleted the carlos/add-escrow-unescrow-functions branch May 3, 2023 09:33
mergify bot pushed a commit that referenced this pull request May 3, 2023
* add escrow/unescrow functions

* fix

* fix linter warning

* imp. add more code documentation

* chore. restructure code to match sybling function

---------

Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
(cherry picked from commit 9ebc2f8)

# Conflicts:
#	modules/apps/transfer/keeper/relay.go
damiannolan added a commit that referenced this pull request May 4, 2023
) (#3550)

* transfer (total escrow): add escrow / unescrow functions (#3507)

* add escrow/unescrow functions

* fix

* fix linter warning

* imp. add more code documentation

* chore. restructure code to match sybling function

---------

Co-authored-by: Colin Axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
(cherry picked from commit 9ebc2f8)

# Conflicts:
#	modules/apps/transfer/keeper/relay.go

* resolving conflicts

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
@faddat faddat mentioned this pull request Jun 23, 2023
9 tasks
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.

5 participants