Skip to content

Commit 04c764a

Browse files
authored
fix(RoutingISM): SetDomain (#153)
1 parent daabf6e commit 04c764a

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414

1515
An '!' indicates a state machine breaking change.
1616

17+
## Unreleased
18+
19+
### Bug Fixes
20+
21+
- [#153](https://github.com/bcp-innovations/hyperlane-cosmos/pull/153) Fix SetDomain for RoutingISM.
22+
1723
## [v1.0.1](https://github.com/bcp-innovations/hyperlane-cosmos/releases/tag/v1.0.1) - 2025-06-05
1824

1925
### Improvements

x/core/01_interchain_security/keeper/msg_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ var _ = Describe("msg_server.go", Ordered, func() {
929929
Expect(ism.Id.String()).To(Equal(routingIsm.Id.String()))
930930
Expect(ism.Routes).To(HaveLen(1))
931931
Expect(ism.Routes[0].Domain).To(Equal(uint32(1337)))
932-
Expect(ism.Routes[0].Ism.String()).To(Equal(noopIsmId.String()))
932+
Expect(ism.Routes[0].Ism.String()).To(Equal(routingIsm.Id.String()))
933933
})
934934

935935
It("RemoveRoutingIsmDomain (invalid) on non routing ism", func() {

x/core/01_interchain_security/types/routing_ism.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ func (m *RoutingISM) RemoveDomain(domainId uint32) bool {
5050

5151
// SetDomain adds/sets a domain to the routing ISM.
5252
func (m *RoutingISM) SetDomain(newRoute Route) {
53-
for _, route := range m.Routes {
53+
for i := range m.Routes {
54+
route := &m.Routes[i]
5455
if newRoute.Domain == route.Domain {
5556
route.Ism = newRoute.Ism
5657
return

0 commit comments

Comments
 (0)