From c4419decbaacdbb012e6315822a989ae077e4d00 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sun, 16 Feb 2020 15:42:23 +0100 Subject: [PATCH 1/2] e2e tests: OpenZeppelin moved to ^pragma 0.6.0 --- test-browser/tests/remixd.js | 1 + test-browser/tests/solidityImport.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test-browser/tests/remixd.js b/test-browser/tests/remixd.js index e4878526ebe..5c12b1bf259 100644 --- a/test-browser/tests/remixd.js +++ b/test-browser/tests/remixd.js @@ -65,6 +65,7 @@ module.exports = { .clickLaunchIcon('fileExplorers') .addFile('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol']) .clickLaunchIcon('solidity') + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 .testContracts('test_import_node_modules_with_github_import.sol', sources[4]['browser/test_import_node_modules_with_github_import.sol'], ['ERC20', 'test11']) .clickLaunchIcon('pluginManager') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') diff --git a/test-browser/tests/solidityImport.js b/test-browser/tests/solidityImport.js index 1ebb4293966..ad871dde8e1 100644 --- a/test-browser/tests/solidityImport.js +++ b/test-browser/tests/solidityImport.js @@ -27,7 +27,7 @@ module.exports = { 'Test Github Import - from master branch': function (browser) { browser - .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 (master branch) .addFile('Untitled4.sol', sources[3]['browser/Untitled4.sol']) .clickLaunchIcon('fileExplorers') .verifyContracts(['test7', 'ERC20', 'SafeMath'], {wait: 10000}) @@ -35,6 +35,7 @@ module.exports = { 'Test Github Import - from other branch': function (browser) { browser + .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') // switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant .addFile('Untitled5.sol', sources[4]['browser/Untitled5.sol']) .clickLaunchIcon('fileExplorers') .verifyContracts(['test8', 'ERC20', 'SafeMath'], {wait: 10000}) @@ -42,6 +43,7 @@ module.exports = { 'Test Github Import - no branch specified': function (browser) { browser + .setSolidityCompilerVersion('soljson-v0.6.2+commit.bacdbe57.js') // open-zeppelin moved to pragma ^0.6.0 (master branch) .addFile('Untitled6.sol', sources[5]['browser/Untitled6.sol']) .clickLaunchIcon('fileExplorers') .verifyContracts(['test10', 'ERC20', 'SafeMath'], {wait: 10000}) From 0308559e9b257a785c5d10001537cedcfe48b624 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sun, 16 Feb 2020 22:23:24 +0100 Subject: [PATCH 2/2] fix emiting newTransaction event --- src/blockchain/pluginUDapp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blockchain/pluginUDapp.js b/src/blockchain/pluginUDapp.js index dec4b51d1d6..93c2f9e3698 100644 --- a/src/blockchain/pluginUDapp.js +++ b/src/blockchain/pluginUDapp.js @@ -9,8 +9,8 @@ class PluginUdapp { } setupEvents () { - this.blockchain.event.register('newTransaction', (tx, receipt) => { - this.events.trigger('newTransaction', [tx, receipt]) + this.blockchain.events.on('newTransaction', (tx, receipt) => { + this.events.emit('newTransaction', tx, receipt) }) }