Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Fix error decoding bridge events #223

Merged
merged 1 commit into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"mocha": "mocha test/ --recursive",
"prettify": "prettier --write 'src/**/*.js*'",
"reset-db": "node scripts/resetDataBase.js",
"mongo": "mongod --fork --syslog"
"mongo": "mongod --fork --syslog",
"postinstall": "CI=true patch-package"
},
"dependencies": {
"@feathers-plus/batch-loader": "^0.3.6",
Expand Down
22 changes: 22 additions & 0 deletions patches/@ethersproject+abi+5.0.0-beta.153.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js
index 1482119..7fc6dc6 100644
--- a/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js
+++ b/node_modules/@ethersproject/abi/lib/coders/abstract-coder.js
@@ -130,14 +130,13 @@ var Reader = /** @class */ (function () {
return Reader.coerce(name, value);
};
Reader.prototype._peekBytes = function (offset, length) {
- var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;
- if (this._offset + alignedLength > this._data.length) {
+ if (this._offset + length > this._data.length) {
logger.throwError("data out-of-bounds", logger_1.Logger.errors.BUFFER_OVERRUN, {
length: this._data.length,
- offset: this._offset + alignedLength
+ offset: this._offset + length
});
}
- return this._data.slice(this._offset, this._offset + alignedLength);
+ return this._data.slice(this._offset, this._offset + length);
};
Reader.prototype.subReader = function (offset) {
return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc);