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

Remove dependency between cw20_escrow and cw20_atomic_swap #115

Closed
ethanfrey opened this issue Oct 10, 2020 · 3 comments · Fixed by #118
Closed

Remove dependency between cw20_escrow and cw20_atomic_swap #115

ethanfrey opened this issue Oct 10, 2020 · 3 comments · Fixed by #118
Assignees

Comments

@ethanfrey
Copy link
Member

There is an import in the escrow contract: use cw20_atomic_swap::balance::Balance;

We should be able to use cw0::Balance

Also, see if there is anything else to de-dup.

@maurolacy
Copy link
Contributor

maurolacy commented Oct 12, 2020

Just to be clear, for that I would have to move Balance (which is an enum for native and cw20 balances) to cw0. That would introduce a dependency of cw0 on cw20.

I'm OK with that, but want to confirm first. Maybe it's better to introduce another mod / namespace for these "mixed" structs.

Update: I would need to put Balance in cw20, to avoid circular dependencies.

@maurolacy
Copy link
Contributor

maurolacy commented Oct 12, 2020

#118. I think it's not bad to put there, as cw20 is built on top of cw0.

cw20 also lacked a balance mod so, we're all happy now.

@ethanfrey
Copy link
Member Author

You are right... the native coin Balance was already in cw0, but this was a different one.

Great job placing it in cw20 in spite of my comment. Very clean

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 a pull request may close this issue.

2 participants