mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-11-04 04:47:27 +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
 | 
			
		||||
func (b Borrow) Validate() error {
 | 
			
		||||
	if b.Borrower.Empty() {
 | 
			
		||||
		return fmt.Errorf("Depositor cannot be empty")
 | 
			
		||||
		return fmt.Errorf("Borrower cannot be empty")
 | 
			
		||||
	}
 | 
			
		||||
	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 {
 | 
			
		||||
@ -40,7 +40,7 @@ func (b Borrow) Validate() error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (b Borrow) String() string {
 | 
			
		||||
	return fmt.Sprintf(`Deposit:
 | 
			
		||||
	return fmt.Sprintf(`Borrow:
 | 
			
		||||
	Borrower: %s
 | 
			
		||||
	Amount: %s
 | 
			
		||||
	Index: %s
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user