Skip to content

Commit

Permalink
fix: allow from flag to accept key-name (#599)
Browse files Browse the repository at this point in the history
* fix: allow from flag to accept key-name

* bump: go version in github actions

* fix: fix test
  • Loading branch information
aleem1314 authored Oct 27, 2021
1 parent ab9ebdd commit b4d3a2a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v2
- name: Display go version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.17
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- run: make build
Expand All @@ -34,7 +34,7 @@ jobs:
steps:
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- name: Install runsim
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Display go version
run: go version
- uses: technote-space/get-diff-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v2
- name: run tests
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
go-version: 1.17
- name: Checkout code
uses: actions/checkout@v2
- name: run experimental test cover
Expand Down
15 changes: 15 additions & 0 deletions x/ecocredit/client/testsuite/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,11 @@ func (s *IntegrationTestSuite) TestTxUpdateAdmin() {
args: append([]string{classId, a1.String(), makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
expErr: false,
},
{
name: "valid test: from key-name",
args: append([]string{classId, a1.String(), makeFlagFrom("node0")}, s.commonTxFlags()...),
expErr: false,
},
}

for _, tc := range testCases {
Expand Down Expand Up @@ -1265,6 +1270,11 @@ func (s *IntegrationTestSuite) TestTxUpdateMetadata() {
args: append([]string{classId, newMetaData, makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
expErr: false,
},
{
name: "valid test: from key-name",
args: append([]string{classId, newMetaData, makeFlagFrom("node0")}, s.commonTxFlags()...),
expErr: false,
},
}

for _, tc := range testCases {
Expand Down Expand Up @@ -1329,6 +1339,11 @@ func (s *IntegrationTestSuite) TestTxUpdateIssuers() {
args: append([]string{classId, fmt.Sprintf("%s,%s", newIssuers[0], newIssuers[1]), makeFlagFrom(val0.Address.String())}, s.commonTxFlags()...),
expErr: false,
},
{
name: "valid test: from key-name",
args: append([]string{classId, fmt.Sprintf("%s,%s", newIssuers[0], newIssuers[1]), makeFlagFrom("node0")}, s.commonTxFlags()...),
expErr: false,
},
}

for _, tc := range testCases {
Expand Down
6 changes: 3 additions & 3 deletions x/ecocredit/client/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ Parameters:
}

msg := ecocredit.MsgUpdateClassMetadata{
Admin: clientCtx.From,
Admin: clientCtx.GetFromAddress().String(),
ClassId: classID,
Metadata: b,
}
Expand Down Expand Up @@ -455,7 +455,7 @@ Parameters:
}

msg := ecocredit.MsgUpdateClassAdmin{
Admin: clientCtx.From,
Admin: clientCtx.GetFromAddress().String(),
ClassId: classID,
NewAdmin: newAdmin,
}
Expand Down Expand Up @@ -495,7 +495,7 @@ Parameters:
}

msg := ecocredit.MsgUpdateClassIssuers{
Admin: clientCtx.From,
Admin: clientCtx.GetFromAddress().String(),
ClassId: classID,
Issuers: issuers,
}
Expand Down

0 comments on commit b4d3a2a

Please sign in to comment.