imp(transfer)!: use AddressCodec instead of Bech32 (backport #8573)#8615
imp(transfer)!: use AddressCodec instead of Bech32 (backport #8573)#8615gjermundgaraba merged 5 commits intocosmos:release/v10.4.xfrom
Conversation
) * imp: added address codec to transfer * imp: address codec used in transfer * fix: tests * imp: test passing * imp: added addressCodec to PFM * imp: added receiver test * test: transfer cov * test: added cases * test: more cov * test: more cov * style: single line func def * test: new test works * imp: add basic test * imp: added migration guide * doc: added changelog * refactor: address codec moved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/v10.4.x #8615 +/- ##
==================================================
Coverage ? 62.55%
==================================================
Files ? 288
Lines ? 20794
Branches ? 0
==================================================
Hits ? 13008
Misses ? 7224
Partials ? 562
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
It looked like CI was having trouble running the E2Es, so I just copied it into a separate PR to run it there: #8616 (I'll close that one once it's green) |
|
The lint issue would be good to get fixed tho |
fixed. |
| // SetAddressCodec sets the address codec used by the keeper. | ||
| func (k *Keeper) SetAddressCodec(addressCodec address.Codec) { | ||
| k.addressCodec = addressCodec | ||
| } | ||
|
|
||
| // GetAddressCodec returns the address codec used by the keeper. | ||
| func (k *Keeper) GetAddressCodec() address.Codec { | ||
| return k.addressCodec | ||
| } | ||
|
|
There was a problem hiding this comment.
Can you instantiate address codec in NewKeeper with a default SDK keeper? In case they forget to call SetAddressCodec?
I see you opted to use k.addressCodec != nil in line. Is there a reason for this?
There was a problem hiding this comment.
this backport is to avoid API breaking change.
There was a problem hiding this comment.
I think what he meant was that inside the NewKeeper function, you should set up a default address codec, so that someone not changing their app.go to include the SetAddressCodec would not break.
| // SetAddressCodec sets the address codec used by the keeper. | ||
| func (k *Keeper) SetAddressCodec(addressCodec address.Codec) { | ||
| k.addressCodec = addressCodec | ||
| } | ||
|
|
||
| // GetAddressCodec returns the address codec used by the keeper. | ||
| func (k *Keeper) GetAddressCodec() address.Codec { | ||
| return k.addressCodec | ||
| } | ||
|
|
Description
Backport #8573 without api breakage.
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.
docs/) if anything is changed.godoccomments if relevant.Files changedin the GitHub PR explorer.