mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
fix strings that said deposit instead of borrow (#962)
This commit is contained in:
parent
38a98ac4fc
commit
e48fed1e27
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user