Skip to content

Commit 6ff7217

Browse files
committed
taprpc: update priceoraclerpc proto definitions
Changes 'ERROR_UNSPECIFIED' and 'ERROR_SUPPORTED' to more closely match the OracleErrorCode values in rfq/oracle.go.
1 parent 79308a2 commit 6ff7217

File tree

4 files changed

+39
-35
lines changed

4 files changed

+39
-35
lines changed

rfq/oracle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ func (r *RpcPriceOracle) QuerySellPrice(ctx context.Context,
384384
// OracleErrorCode.
385385
func marshallErrorCode(code oraclerpc.ErrorCode) OracleErrorCode {
386386
switch code {
387-
case oraclerpc.ErrorCode_ERROR_UNSPECIFIED:
387+
case oraclerpc.ErrorCode_UNSPECIFIED_ORACLE_ERROR_CODE:
388388
return UnspecifiedOracleErrorCode
389-
case oraclerpc.ErrorCode_ERROR_UNSUPPORTED:
389+
case oraclerpc.ErrorCode_UNSUPPORTED_ASSET_ORACLE_ERROR_CODE:
390390
return UnsupportedAssetOracleErrorCode
391391
default:
392392
return UnspecifiedOracleErrorCode

taprpc/priceoraclerpc/price_oracle.pb.go

Lines changed: 28 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taprpc/priceoraclerpc/price_oracle.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ enum Intent {
8484
// ErrorCode represents the possible error codes that can be returned in a
8585
// QueryAssetRatesErrResponse.
8686
enum ErrorCode {
87-
// ERROR_UNSPECIFIED indicates an unspecified error.
88-
ERROR_UNSPECIFIED = 0;
87+
// UNSPECIFIED_ORACLE_ERROR_CODE indicates an unspecified error.
88+
UNSPECIFIED_ORACLE_ERROR_CODE = 0;
8989

90-
// UNSUPPORTED indicates the asset is not supported.
91-
ERROR_UNSUPPORTED = 1;
90+
// UNSUPPORTED_ASSET_ORACLE_ERROR_CODE indicates the asset is not
91+
// supported.
92+
UNSUPPORTED_ASSET_ORACLE_ERROR_CODE = 1;
9293
}
9394

9495
// FixedPoint is a scaled integer representation of a fractional number.

taprpc/priceoraclerpc/price_oracle.swagger.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@
247247
"priceoraclerpcErrorCode": {
248248
"type": "string",
249249
"enum": [
250-
"ERROR_UNSPECIFIED",
251-
"ERROR_UNSUPPORTED"
250+
"UNSPECIFIED_ORACLE_ERROR_CODE",
251+
"UNSUPPORTED_ASSET_ORACLE_ERROR_CODE"
252252
],
253-
"default": "ERROR_UNSPECIFIED",
254-
"description": "ErrorCode represents the possible error codes that can be returned in a\nQueryAssetRatesErrResponse.\n\n - ERROR_UNSPECIFIED: ERROR_UNSPECIFIED indicates an unspecified error.\n - ERROR_UNSUPPORTED: UNSUPPORTED indicates the asset is not supported."
253+
"default": "UNSPECIFIED_ORACLE_ERROR_CODE",
254+
"description": "ErrorCode represents the possible error codes that can be returned in a\nQueryAssetRatesErrResponse.\n\n - UNSPECIFIED_ORACLE_ERROR_CODE: UNSPECIFIED_ORACLE_ERROR_CODE indicates an unspecified error.\n - UNSUPPORTED_ASSET_ORACLE_ERROR_CODE: UNSUPPORTED_ASSET_ORACLE_ERROR_CODE indicates the asset is not\nsupported."
255255
},
256256
"priceoraclerpcFixedPoint": {
257257
"type": "object",

0 commit comments

Comments
 (0)