Skip to content

Commit

Permalink
feat: mod metricsResp
Browse files Browse the repository at this point in the history
  • Loading branch information
turingczz committed Jul 7, 2022
1 parent 12c582d commit c0a9286
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 146 deletions.
42 changes: 9 additions & 33 deletions js/protos/status/status_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ proto.status.MetricsResp.toObject = function(includeInstance, msg) {
nonce: jspb.Message.getFieldWithDefault(msg, 6, 0),
bttcAddress: jspb.Message.getFieldWithDefault(msg, 7, ""),
signedTime: jspb.Message.getFieldWithDefault(msg, 8, 0),
signature: msg.getSignature_asB64()
signature: jspb.Message.getFieldWithDefault(msg, 9, "")
};

if (includeInstance) {
Expand Down Expand Up @@ -614,7 +614,7 @@ proto.status.MetricsResp.deserializeBinaryFromReader = function(msg, reader) {
msg.setSignedTime(value);
break;
case 9:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
var value = /** @type {string} */ (reader.readString());
msg.setSignature(value);
break;
default:
Expand Down Expand Up @@ -702,9 +702,9 @@ proto.status.MetricsResp.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getSignature_asU8();
f = message.getSignature();
if (f.length > 0) {
writer.writeBytes(
writer.writeString(
9,
f
);
Expand Down Expand Up @@ -857,44 +857,20 @@ proto.status.MetricsResp.prototype.setSignedTime = function(value) {


/**
* optional bytes signature = 9;
* @return {!(string|Uint8Array)}
*/
proto.status.MetricsResp.prototype.getSignature = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
* optional bytes signature = 9;
* This is a type-conversion wrapper around `getSignature()`
* optional string signature = 9;
* @return {string}
*/
proto.status.MetricsResp.prototype.getSignature_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getSignature()));
};


/**
* optional bytes signature = 9;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getSignature()`
* @return {!Uint8Array}
*/
proto.status.MetricsResp.prototype.getSignature_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getSignature()));
proto.status.MetricsResp.prototype.getSignature = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
* @param {!(string|Uint8Array)} value
* @param {string} value
* @return {!proto.status.MetricsResp} returns this
*/
proto.status.MetricsResp.prototype.setSignature = function(value) {
return jspb.Message.setProto3BytesField(this, 9, value);
return jspb.Message.setProto3StringField(this, 9, value);
};


Expand Down
Loading

0 comments on commit c0a9286

Please sign in to comment.