Skip to content

Commit bbd3afe

Browse files
committed
taprpc: update priceoraclerpc proto defs
1 parent b9b018a commit bbd3afe

File tree

3 files changed

+145
-70
lines changed

3 files changed

+145
-70
lines changed

taprpc/priceoraclerpc/price_oracle.pb.go

Lines changed: 124 additions & 67 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: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ enum Intent {
8181
INTENT_RECV_PAYMENT_QUALIFY = 6;
8282
}
8383

84+
// ErrorCode represents the possible error codes that can be returned in a
85+
// QueryAssetRatesErrResponse.
86+
enum ErrorCode {
87+
// ERROR_UNSPECIFIED indicates an unspecified error.
88+
ERROR_UNSPECIFIED = 0;
89+
90+
// UNSUPPORTED indicates the asset is not supported.
91+
ERROR_UNSUPPORTED = 1;
92+
}
93+
8494
// FixedPoint is a scaled integer representation of a fractional number.
8595
//
8696
// This type consists of two integer fields: a coefficient and a scale.
@@ -228,7 +238,7 @@ message QueryAssetRatesErrResponse {
228238
string message = 1;
229239

230240
// code is the error code.
231-
uint32 code = 2;
241+
ErrorCode code = 2;
232242
}
233243

234244
// QueryAssetRatesResponse is the response from a QueryAssetRates RPC call.

taprpc/priceoraclerpc/price_oracle.swagger.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@
244244
},
245245
"description": "AssetSpecifier is a union type for specifying an asset by either its asset ID\nor group key."
246246
},
247+
"priceoraclerpcErrorCode": {
248+
"type": "string",
249+
"enum": [
250+
"ERROR_UNSPECIFIED",
251+
"ERROR_UNSUPPORTED"
252+
],
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."
255+
},
247256
"priceoraclerpcFixedPoint": {
248257
"type": "object",
249258
"properties": {
@@ -281,8 +290,7 @@
281290
"description": "error is the error message."
282291
},
283292
"code": {
284-
"type": "integer",
285-
"format": "int64",
293+
"$ref": "#/definitions/priceoraclerpcErrorCode",
286294
"description": "code is the error code."
287295
}
288296
},

0 commit comments

Comments
 (0)