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

feat: improve account relationship mapping #100

Merged
merged 10 commits into from
Jul 24, 2023

Conversation

MonikaCat
Copy link
Contributor

@MonikaCat MonikaCat commented Jul 21, 2023

Description

BDU-950 & BDU-1006

Checklist

  • Targeted PR against correct branch.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit tests.
  • Re-reviewed Files changed in the Github PR explorer.

@MonikaCat MonikaCat marked this pull request as ready for review July 21, 2023 09:03
@MonikaCat MonikaCat added the automerge Automatically merge PR once all prerequisites pass label Jul 21, 2023
@MonikaCat MonikaCat requested a review from RiccardoM July 21, 2023 09:12
addresses = append(addresses, msg.Grantee)
return addresses, nil
if strings.Contains(attribute.Value, chainPrefix) {
allAddressess = append(allAddressess, attribute.Value)
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work. If the attribute is, for example desmos-subspace-1 then it would be inserted as an address.

Instead, we should make sure the address is a valid format first. This can be done using sdk.AccAddressFromBech32 or the other methods (if we want to include validator addresses as well). Then, if the error of the parsing is not nill, we include the address inside the list of parsed addresses. Otherwise we skip it.

@MonikaCat MonikaCat requested a review from RiccardoM July 24, 2023 12:07
@RiccardoM RiccardoM merged commit f69e539 into cosmos/v0.47.x Jul 24, 2023
@RiccardoM RiccardoM deleted the BDU-950-improve-account-relationship-mapping branch July 24, 2023 15:00
MonikaCat added a commit that referenced this pull request Aug 31, 2023
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Dec 22, 2023
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Dec 27, 2023
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 2, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 2, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 4, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 4, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 4, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰    
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Description
<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

## Checklist
- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.  
- [x] Re-reviewed `Files changed` in the Github PR explorer.


[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 4, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 4, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
MonikaCat added a commit that referenced this pull request Jan 5, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.
- [x] Re-reviewed `Files changed` in the Github PR explorer.

[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
dzmitryhil pushed a commit to CoreumFoundation/junov5 that referenced this pull request Dec 16, 2024
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰    
v    Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Description
<!-- Small description -->
[BDU-950](https://forbole.atlassian.net/browse/BDU-950) &
[BDU-1006](https://forbole.atlassian.net/browse/BDU-1006)

## Checklist
- [x] Targeted PR against correct branch.
- [x] Linked to Github issue with discussion and accepted design OR link
to spec that describes this work.
- [ ] Wrote unit tests.  
- [x] Re-reviewed `Files changed` in the Github PR explorer.


[BDU-950]:
https://forbole.atlassian.net/browse/BDU-950?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

[BDU-1006]:
https://forbole.atlassian.net/browse/BDU-1006?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once all prerequisites pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants