@@ -97,13 +97,13 @@ type OracleError struct {
9797type OracleErrorCode uint8
9898
9999const (
100- // ErrUnspecifiedOracleError represents the case where the oracle has
100+ // UnspecifiedOracleErrorCode represents the case where the oracle has
101101 // declined to give a more specific reason for the error.
102- ErrUnspecifiedOracleError OracleErrorCode = iota
102+ UnspecifiedOracleErrorCode OracleErrorCode = iota
103103
104- // ErrUnsupportedOracleAsset represents the case in which an oracle does
105- // not provide quotes for the requested asset.
106- ErrUnsupportedOracleAsset
104+ // UnsupportedAssetOracleErrorCode represents the case in which an
105+ // oracle does not provide quotes for the requested asset.
106+ UnsupportedAssetOracleErrorCode
107107)
108108
109109// Error returns a human-readable string representation of the error.
@@ -385,11 +385,11 @@ func (r *RpcPriceOracle) QuerySellPrice(ctx context.Context,
385385func marshallErrorCode (code oraclerpc.ErrorCode ) OracleErrorCode {
386386 switch code {
387387 case oraclerpc .ErrorCode_ERROR_UNSPECIFIED :
388- return ErrUnspecifiedOracleError
388+ return UnspecifiedOracleErrorCode
389389 case oraclerpc .ErrorCode_ERROR_UNSUPPORTED :
390- return ErrUnsupportedOracleAsset
390+ return UnsupportedAssetOracleErrorCode
391391 default :
392- return ErrUnspecifiedOracleError
392+ return UnspecifiedOracleErrorCode
393393 }
394394}
395395
0 commit comments