From 63a95de39a5cde2f4b718e153c23ea1002180385 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 26 Aug 2021 10:03:53 +0200 Subject: [PATCH 1/2] fix error message --- apps/remix-ide/src/app/tabs/runTab/contractDropdown.js | 2 +- apps/remix-ide/src/blockchain/blockchain.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js index 8328e04bcb..e66ad8a5b8 100644 --- a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js +++ b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js @@ -319,7 +319,7 @@ class ContractDropdownUI { try { contractMetadata = await this.runView.call('compilerMetadata', 'deployMetadataOf', selectedContract.name, selectedContract.contract.file) } catch (error) { - return statusCb(`creation of ${selectedContract.name} errored: ` + (error.message ? error.message : error)) + return statusCb(`creation of ${selectedContract.name} errored: ${error.message ? error.message : error}`) } const compilerContracts = this.dropdownLogic.getCompilerContracts() diff --git a/apps/remix-ide/src/blockchain/blockchain.js b/apps/remix-ide/src/blockchain/blockchain.js index a5039a4c6b..0d43b1451b 100644 --- a/apps/remix-ide/src/blockchain/blockchain.js +++ b/apps/remix-ide/src/blockchain/blockchain.js @@ -108,7 +108,7 @@ class Blockchain extends Plugin { const { continueCb, promptCb, statusCb, finalCb } = callbacks const constructor = selectedContract.getConstructorInterface() txFormat.buildData(selectedContract.name, selectedContract.object, compilerContracts, true, constructor, args, (error, data) => { - if (error) return statusCb(`creation of ${selectedContract.name} errored: ` + error) + if (error) return statusCb(`creation of ${selectedContract.name} errored: ${error.message ? error.message : error}`) statusCb(`creation of ${selectedContract.name} pending...`) this.createContract(selectedContract, data, continueCb, promptCb, confirmationCb, finalCb) @@ -122,7 +122,7 @@ class Blockchain extends Plugin { const { continueCb, promptCb, statusCb, finalCb } = callbacks const constructor = selectedContract.getConstructorInterface() txFormat.encodeConstructorCallAndLinkLibraries(selectedContract.object, args, constructor, contractMetadata.linkReferences, selectedContract.bytecodeLinkReferences, (error, data) => { - if (error) return statusCb(`creation of ${selectedContract.name} errored: ` + (error.message ? error.message : error)) + if (error) return statusCb(`creation of ${selectedContract.name} errored: ${error.message ? error.message : error}`) statusCb(`creation of ${selectedContract.name} pending...`) this.createContract(selectedContract, data, continueCb, promptCb, confirmationCb, finalCb) @@ -139,7 +139,7 @@ class Blockchain extends Plugin { this.runTx({ data: data, useCall: false }, confirmationCb, continueCb, promptCb, (error, txResult, address) => { if (error) { - return finalCb(`creation of ${selectedContract.name} errored: ${(error.message ? error.message : error)}`) + return finalCb(`creation of ${selectedContract.name} errored: ${error.message ? error.message : error}`) } if (txResult.receipt.status === false || txResult.receipt.status === '0x0') { return finalCb(`creation of ${selectedContract.name} errored: transaction execution failed`) @@ -265,7 +265,7 @@ class Blockchain extends Plugin { // contractsDetails is used to resolve libraries txFormat.buildData(contractName, contractAbi, {}, false, funABI, callType, (error, data) => { if (error) { - return logCallback(`${logMsg} errored: ${error} `) + return logCallback(`${logMsg} errored: ${error.message ? error.message : error}`) } if (!lookupOnly) { logCallback(`${logMsg} pending ... `) @@ -282,7 +282,7 @@ class Blockchain extends Plugin { const useCall = funABI.stateMutability === 'view' || funABI.stateMutability === 'pure' this.runTx({ to: address, data, useCall }, confirmationCb, continueCb, promptCb, (error, txResult, _address, returnValue) => { if (error) { - return logCallback(`${logMsg} errored: ${error} `) + return logCallback(`${logMsg} errored: ${error.message ? error.message : error}`) } if (lookupOnly) { outputCb(returnValue) From aaffbd483d52e84ba821c8369852bc343d8f1baf Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 26 Aug 2021 10:19:29 +0200 Subject: [PATCH 2/2] default max priority fee to 1 --- apps/remix-ide/src/app/ui/confirmDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/ui/confirmDialog.js b/apps/remix-ide/src/app/ui/confirmDialog.js index 8abd11d900..9bf44e6333 100644 --- a/apps/remix-ide/src/app/ui/confirmDialog.js +++ b/apps/remix-ide/src/app/ui/confirmDialog.js @@ -89,7 +89,7 @@ function confirmDialog (tx, network, amount, gasEstimation, newGasPriceCb, initi
Max Priority fee: - + Gwei