-
Notifications
You must be signed in to change notification settings - Fork 355
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
cw20-escrow refactoring: Unify handling of native and cw20 #92
Conversation
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.
Nice integration and ideas.
Added some comments to clean it up a bit more.
0fef0b6
to
ede00cf
Compare
e08aaca
to
a8594cd
Compare
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.
Looks good, merging.
Left some comment on a few style nitpicks, things for the future
A first iteration on #88.
This can be unified / simplified further, by example by introducing a
Cw20Balance
type. Or by introducing a genericCoin
, that is a wrapper aroundNativeCoin
andCw20Coin
. But, better leave those for another task / PR.I'm not so happy with some of the trade-offs here. Like using a tuple type for the escrow balance. I also couldn't avoid code repetition in some parts, due to the structural differences between a
Coin
and aCw20Coin
. Maybe wrapping everything into a genericCoin
is a good idea?