Skip to content

Commit 612fb22

Browse files
committed
fix repay msg validation
1 parent 1062c73 commit 612fb22

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

proto/side/lending/tx.proto

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ message MsgRepay{
3838
string borrower = 1;
3939
string loan_id = 2;
4040
string adaptor_point = 3;
41-
// string claim_tx_id = 4;
42-
// string adaptor_signature = 5;
4341
}
4442

4543
message MsgRepayResponse{}

x/lending/types/msg_repay.go

+4-14
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ import (
66

77
var _ sdk.Msg = &MsgRepay{}
88

9-
func NewMsgRepay(borrower string, loanId string, adaptorPoint string, txid string, signature string) *MsgRepay {
9+
func NewMsgRepay(borrower string, loanId string, adaptorPoint string) *MsgRepay {
1010
return &MsgRepay{
11-
Borrower: borrower,
12-
AdaptorPoint: adaptorPoint,
13-
LoanId: loanId,
14-
ClaimTxId: txid,
15-
AdaptorSignature: signature,
11+
Borrower: borrower,
12+
AdaptorPoint: adaptorPoint,
13+
LoanId: loanId,
1614
}
1715
}
1816

@@ -30,13 +28,5 @@ func (m *MsgRepay) ValidateBasic() error {
3028
return ErrInvalidRepayment
3129
}
3230

33-
if len(m.ClaimTxId) == 0 {
34-
return ErrInvalidRepaymentTx
35-
}
36-
37-
if len(m.AdaptorSignature) == 0 {
38-
return ErrInvalidRepaymentTx
39-
}
40-
4131
return nil
4232
}

0 commit comments

Comments
 (0)