fix strings that said deposit instead of borrow (#962)

This commit is contained in:
Ruaridh 2021-07-15 15:16:25 +01:00 committed by GitHub
parent 38a98ac4fc
commit e48fed1e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,10 +26,10 @@ func NewBorrow(borrower sdk.AccAddress, amount sdk.Coins, index BorrowInterestFa
// Validate deposit validation // Validate deposit validation
func (b Borrow) Validate() error { func (b Borrow) Validate() error {
if b.Borrower.Empty() { if b.Borrower.Empty() {
return fmt.Errorf("Depositor cannot be empty") return fmt.Errorf("Borrower cannot be empty")
} }
if !b.Amount.IsValid() { if !b.Amount.IsValid() {
return fmt.Errorf("Invalid deposit coins: %s", b.Amount) return fmt.Errorf("Invalid borrow coins: %s", b.Amount)
} }
if err := b.Index.Validate(); err != nil { if err := b.Index.Validate(); err != nil {
@ -40,7 +40,7 @@ func (b Borrow) Validate() error {
} }
func (b Borrow) String() string { func (b Borrow) String() string {
return fmt.Sprintf(`Deposit: return fmt.Sprintf(`Borrow:
Borrower: %s Borrower: %s
Amount: %s Amount: %s
Index: %s Index: %s