Avoid manipulating the $protobuf object
This commit is contained in:
parent
ab72909e60
commit
db2969d924
@ -28,3 +28,7 @@ yarn pbjs \
|
||||
"$TENDERMINT_PROTO_DIR/crypto/merkle/merkle.proto" \
|
||||
"$TENDERMINT_PROTO_DIR/libs/kv/types.proto" \
|
||||
"$GOOGLE_PROTO_DIR/protobuf/any.proto"
|
||||
|
||||
# Work around https://github.com/protobufjs/protobuf.js/issues/1477
|
||||
# shellcheck disable=SC2016
|
||||
sed -i "" -e 's/^const \$root =.*$/const \$root = {};/' "$GENERATED_DIR/codecimpl.js"
|
||||
|
||||
@ -5,7 +5,7 @@ var $protobuf = require("protobufjs/minimal");
|
||||
const $Reader = $protobuf.Reader,
|
||||
$Writer = $protobuf.Writer,
|
||||
$util = $protobuf.util;
|
||||
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
||||
const $root = {};
|
||||
exports.cosmos = $root.cosmos = (() => {
|
||||
const cosmos = {};
|
||||
cosmos.Coin = (function () {
|
||||
|
||||
@ -30,3 +30,7 @@ yarn pbjs \
|
||||
"$TENDERMINT_PROTO_DIR/crypto/merkle/merkle.proto" \
|
||||
"$TENDERMINT_PROTO_DIR/libs/kv/types.proto" \
|
||||
"$GOOGLE_PROTO_DIR/protobuf/any.proto"
|
||||
|
||||
# Work around https://github.com/protobufjs/protobuf.js/issues/1477
|
||||
# shellcheck disable=SC2016
|
||||
sed -i "" -e 's/^const \$root =.*$/const \$root = {};/' "$GENERATED_DIR/codecimpl.js"
|
||||
|
||||
@ -5,7 +5,7 @@ var $protobuf = require("protobufjs/minimal");
|
||||
const $Reader = $protobuf.Reader,
|
||||
$Writer = $protobuf.Writer,
|
||||
$util = $protobuf.util;
|
||||
const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
||||
const $root = {};
|
||||
exports.cosmos = $root.cosmos = (() => {
|
||||
const cosmos = {};
|
||||
cosmos.Coin = (function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user