laconicd/tests/solidity/suites/staking/patches/truffle+5.4.14.patch
Yijia Su 8bf8d34376
ci: update test scripts and actions (#657)
* Update test scripts and CI

* Update timeout

* Update test-helper

* fix issue for staking test

* fix bug in test helper

* reduce block time

* Update test cases

* use truffle 5.4.14 as global

* remove two checks

* reduce block time to 150ms

* fix patches paths

* Update test scripts

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-21 11:06:20 +00:00

38 lines
1.2 KiB
Diff

diff --git a/node_modules/truffle/build/459.bundled.js b/node_modules/truffle/build/459.bundled.js
index a206402..72962d6 100644
--- a/node_modules/truffle/build/459.bundled.js
+++ b/node_modules/truffle/build/459.bundled.js
@@ -19843,16 +19843,23 @@ const reason = {
if (isObject) {
const data = res.error.data;
- const hash = Object.keys(data)[0];
+ if (typeof data === "object") {
+ const hash = Object.keys(data)[0];
- if (data[hash].return && data[hash].return.includes(errorStringHash)) {
- try {
- return web3.eth.abi.decodeParameter(
- "string",
- data[hash].return.slice(10)
- );
- } catch (_) {
- return undefined;
+ if (data[hash].return && data[hash].return.includes(errorStringHash)) {
+ try {
+ return web3.eth.abi.decodeParameter(
+ "string",
+ data[hash].return.slice(10)
+ );
+ } catch (_) {
+ return undefined;
+ }
+ }
+ }
+ else {
+ if (res.error.message) {
+ return res.error.message;
}
}
} else if (isString && res.result.includes(errorStringHash)) {