-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: multichain test of auto-stake-it
- auto-stake-it transfer tokens to an InterchainAccount and delegates them when received over IBC to a contract controlled account - includes patches for @cosmjs/stargate, since we are using it to execute IBC transfers from external accounts - refs: #9042
- Loading branch information
1 parent
84d2192
commit 3d80104
Showing
7 changed files
with
407 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/node_modules/axios/dist/node/axios.cjs b/node_modules/axios/dist/node/axios.cjs | ||
index 9099d87..7104f6e 100644 | ||
--- a/node_modules/axios/dist/node/axios.cjs | ||
+++ b/node_modules/axios/dist/node/axios.cjs | ||
@@ -370,9 +370,9 @@ function merge(/* obj1, obj2, obj3, ... */) { | ||
const extend = (a, b, thisArg, {allOwnKeys}= {}) => { | ||
forEach(b, (val, key) => { | ||
if (thisArg && isFunction(val)) { | ||
- a[key] = bind(val, thisArg); | ||
+ Object.defineProperty(a, key, {value: bind(val, thisArg)}); | ||
} else { | ||
- a[key] = val; | ||
+ Object.defineProperty(a, key, {value: val}); | ||
} | ||
}, {allOwnKeys}); | ||
return a; | ||
@@ -403,7 +403,9 @@ const stripBOM = (content) => { | ||
*/ | ||
const inherits = (constructor, superConstructor, props, descriptors) => { | ||
constructor.prototype = Object.create(superConstructor.prototype, descriptors); | ||
- constructor.prototype.constructor = constructor; | ||
+ Object.defineProperty(constructor, 'constructor', { | ||
+ value: constructor | ||
+ }); | ||
Object.defineProperty(constructor, 'super', { | ||
value: superConstructor.prototype | ||
}); | ||
@@ -565,12 +567,14 @@ const isRegExp = kindOfTest('RegExp'); | ||
|
||
const reduceDescriptors = (obj, reducer) => { | ||
const descriptors = Object.getOwnPropertyDescriptors(obj); | ||
- const reducedDescriptors = {}; | ||
+ let reducedDescriptors = {}; | ||
|
||
forEach(descriptors, (descriptor, name) => { | ||
let ret; | ||
if ((ret = reducer(descriptor, name, obj)) !== false) { | ||
- reducedDescriptors[name] = ret || descriptor; | ||
+ reducedDescriptors = {...reducedDescriptors, | ||
+ [name]: ret || descriptor | ||
+ }; | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/node_modules/protobufjs/src/util/minimal.js b/node_modules/protobufjs/src/util/minimal.js | ||
index 7f62daa..8d60657 100644 | ||
--- a/node_modules/protobufjs/src/util/minimal.js | ||
+++ b/node_modules/protobufjs/src/util/minimal.js | ||
@@ -259,14 +259,9 @@ util.newError = newError; | ||
* @returns {Constructor<Error>} Custom error constructor | ||
*/ | ||
function newError(name) { | ||
- | ||
function CustomError(message, properties) { | ||
- | ||
if (!(this instanceof CustomError)) | ||
return new CustomError(message, properties); | ||
- | ||
- // Error.call(this, message); | ||
- // ^ just returns a new error instance because the ctor can be called as a function | ||
|
||
Object.defineProperty(this, "message", { get: function() { return message; } }); | ||
|
||
@@ -280,13 +275,31 @@ function newError(name) { | ||
merge(this, properties); | ||
} | ||
|
||
- (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; | ||
+ // Create a new object with Error.prototype as its prototype | ||
+ const proto = Object.create(Error.prototype); | ||
|
||
- Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); | ||
+ // Define properties on the prototype | ||
+ Object.defineProperties(proto, { | ||
+ constructor: { | ||
+ value: CustomError, | ||
+ writable: true, | ||
+ configurable: true | ||
+ }, | ||
+ name: { | ||
+ get: function() { return name; }, | ||
+ configurable: true | ||
+ }, | ||
+ toString: { | ||
+ value: function toString() { | ||
+ return this.name + ": " + this.message; | ||
+ }, | ||
+ writable: true, | ||
+ configurable: true | ||
+ } | ||
+ }); | ||
|
||
- CustomError.prototype.toString = function toString() { | ||
- return this.name + ": " + this.message; | ||
- }; | ||
+ // Set the prototype of CustomError | ||
+ CustomError.prototype = proto; | ||
|
||
return CustomError; | ||
} |
Oops, something went wrong.