-
Notifications
You must be signed in to change notification settings - Fork 624
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
feat(core, apps): 'PacketDataProvider' interface added and implemented #4199
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.
LGTM! Will take another quick peak after the cast removal change is added
testCases := []struct { | ||
name string | ||
packetData types.FungibleTokenPacketData | ||
expAdditionalData map[string]interface{} |
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.
can also maybe call expCustomData
?
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.
done
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4199 +/- ##
==========================================
+ Coverage 79.45% 79.47% +0.01%
==========================================
Files 188 188
Lines 12990 13025 +35
==========================================
+ Hits 10321 10351 +30
- Misses 2240 2243 +3
- Partials 429 431 +2
|
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.
Beautiful! Thank you! Only left a comment on a nit because of naming consistency
testCases := []struct { | ||
name string | ||
packetData types.FungibleTokenPacketData | ||
expAdditionalData interface{} |
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.
super super nit: expAdditionalData
-> expCustomData
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.
done
#4199) * refactor(core/exported): moved packet interfaces to packet.go * feat(core/exported): 'PacketDataProvider' interface added * feat(transfer): PacketDataProvider implemented * feat(ica): implemented PacketDataProvider * style(transfer_test, ica_test): improved test name * docs(core.adr8): updated godocs * style(ica_test): changed a variable name * docs(core.adr8): added missing '.' * imp(transfer): removed type assertion on jsonKey * fix(transfer_test): removed unused test case parameter * docs(transfer): updated godocs * imp(ica): removed type assertion from 'GetCustomPacketData' * imp(transfer_test): improved tests without type assertion * imp(ica_test): improved tests without type assertion * style(transfer_test): changed test case parameter name (cherry picked from commit a0a6526) # Conflicts: # modules/apps/27-interchain-accounts/types/packet.go # modules/apps/transfer/types/packet.go # modules/core/exported/channel.go
…d (backport #4199) (#4218) * feat(core, apps): 'PacketDataProvider' interface added and implemented (#4199) * refactor(core/exported): moved packet interfaces to packet.go * feat(core/exported): 'PacketDataProvider' interface added * feat(transfer): PacketDataProvider implemented * feat(ica): implemented PacketDataProvider * style(transfer_test, ica_test): improved test name * docs(core.adr8): updated godocs * style(ica_test): changed a variable name * docs(core.adr8): added missing '.' * imp(transfer): removed type assertion on jsonKey * fix(transfer_test): removed unused test case parameter * docs(transfer): updated godocs * imp(ica): removed type assertion from 'GetCustomPacketData' * imp(transfer_test): improved tests without type assertion * imp(ica_test): improved tests without type assertion * style(transfer_test): changed test case parameter name (cherry picked from commit a0a6526) # Conflicts: # modules/apps/27-interchain-accounts/types/packet.go # modules/apps/transfer/types/packet.go # modules/core/exported/channel.go * fix: fixed backport conflicts * style: ran gofumpt * style(ica_test): typo fixed --------- Co-authored-by: srdtrk <[email protected]> Co-authored-by: srdtrk <[email protected]>
Description
This PR reduces the diff when reviewing the adr8 PR #3939.
PacketDataProvider
defines an optional interfaces for retrieving custom packet data stored on behalf of another application.closes: #XXXX
Commit Message / Changelog Entry
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.
Linked to Github issue with discussion and accepted design OR link to spec that describes this work.docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.