-
Notifications
You must be signed in to change notification settings - Fork 50
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
finding withdrawal #590
finding withdrawal #590
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## bounty #590 +/- ##
=========================================
Coverage ? 41.17%
=========================================
Files ? 146
Lines ? 13247
Branches ? 0
=========================================
Hits ? 5454
Misses ? 7284
Partials ? 509 |
ctx.EventManager().EmitEvents(sdk.Events{ | ||
sdk.NewEvent( | ||
types.EventTypeWithdrawalFinding, | ||
sdk.NewAttribute(types.AttributeKeyFindingID, strconv.FormatUint(msg.FindingId, 10)), |
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.
Would it be better to add a programId event attribute?
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.
yes it should be better
proto/shentu/bounty/v1/tx.proto
Outdated
message MsgHostRejectFindingResponse {} | ||
|
||
message MsgWithdrawalFinding { |
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.
MsgCancelFinding should be better
x/bounty/client/cli/tx.go
Outdated
@@ -34,6 +34,7 @@ func NewTxCmd() *cobra.Command { | |||
NewSubmitFindingCmd(), | |||
NewHostAcceptFindingCmd(), | |||
NewHostRejectFindingCmd(), | |||
NewWithdrawalFindingCmd(), |
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.
NewCancelFindingCmd
x/bounty/keeper/finding.go
Outdated
return k.SetPidFindingIDList(ctx, pid, fids) | ||
} | ||
} | ||
return fmt.Errorf("finding id not exists") |
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.
doesn't exist or does not exist
x/bounty/keeper/finding.go
Outdated
store := ctx.KVStore(k.storeKey) | ||
store.Delete(types.GetProgramIDFindingListKey(pid)) | ||
return nil | ||
|
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.
delete empty line
ctx.EventManager().EmitEvents(sdk.Events{ | ||
sdk.NewEvent( | ||
types.EventTypeWithdrawalFinding, | ||
sdk.NewAttribute(types.AttributeKeyFindingID, strconv.FormatUint(msg.FindingId, 10)), |
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.
yes it should be better
|
||
// Finding | ||
const ( | ||
errFindingNotExists uint32 = iota + 201 |
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.
probably better to merge these errors with above
x/bounty/types/msgs.go
Outdated
TypeMsgSubmitFinding = "submit_finding" | ||
TypeMsgAcceptFinding = "accept_finding" | ||
TypeMsgRejectFinding = "reject_finding" | ||
TypeMsgWithdrawalFinding = "withdrawal_finding" |
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.
cancel_finding
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
Closes: #553
Related: #XXX
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)