style: logs

This commit is contained in:
Kirill 2023-07-02 20:09:16 +03:00
parent e1821e1f3f
commit bea86e2512

@ -80,10 +80,7 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
To: request.Account.Wallet.Currency,
})
if translateErr != nil {
receiver.logger.Error("failed to translate cash on <ReplenishAccountWallet> of <WalletService>",
zap.Error(translateErr),
)
receiver.logger.Error("failed to translate cash on <ReplenishAccountWallet> of <WalletService>", zap.Error(translateErr))
return nil, translateErr
}
@ -127,10 +124,7 @@ func (receiver *Service) ReplenishAccountWallet(ctx context.Context, request *mo
To: models.InternalCurrencyKey,
})
if err != nil {
receiver.logger.Error("failed to translate money on <ReplenishAccountWallet> of <WalletService>",
zap.Error(err),
)
receiver.logger.Error("failed to translate money on <ReplenishAccountWallet> of <WalletService>", zap.Error(err))
return nil, err
}
@ -179,10 +173,7 @@ func (receiver *Service) WithdrawAccountWalletMoney(ctx context.Context, request
To: request.Account.Wallet.Currency,
})
if err != nil {
receiver.logger.Error("failed to translate money on <WithdrawAccountWalletMoney> of <WalletService>",
zap.Error(err),
)
receiver.logger.Error("failed to translate money on <WithdrawAccountWalletMoney> of <WalletService>", zap.Error(err))
return nil, err
}
@ -225,10 +216,7 @@ func (receiver *Service) ChangeCurrency(ctx context.Context, userID string, curr
To: currency,
})
if err != nil {
receiver.logger.Error("failed to translate currency on <ChangeCurrency> of <WalletService>",
zap.Error(err),
)
receiver.logger.Error("failed to translate currency on <ChangeCurrency> of <WalletService>", zap.Error(err))
return nil, err
}
@ -238,10 +226,7 @@ func (receiver *Service) ChangeCurrency(ctx context.Context, userID string, curr
Money: account.Wallet.Money,
})
if err != nil {
receiver.logger.Error("failed to update wallet on <ChangeCurrency> of <WalletService>",
zap.Error(err),
)
receiver.logger.Error("failed to update wallet on <ChangeCurrency> of <WalletService>", zap.Error(err))
return nil, err
}