diff --git a/interface/client/lib/ethereum/1_web3js_init.js b/interface/client/lib/ethereum/1_web3js_init.js index fc80d40a2..15f612e52 100644 --- a/interface/client/lib/ethereum/1_web3js_init.js +++ b/interface/client/lib/ethereum/1_web3js_init.js @@ -2,9 +2,15 @@ if(typeof web3 !== 'undefined') { console.info('Web3 already initialized, re-using provider.'); - web3 = new Web3(web3.currentProvider); + // add web3 backwards compatibility + if(!web3.currentProvider.sendAsync) { + web3.currentProvider.sendAsync = web3.currentProvider.send; + web3.currentProvider.send = web3.currentProvider.sendSync; + } + + web3 = new Web3(web3.currentProvider); } else { - console.info('Web3 not yet initialized, doing so now with HttpProvider.'); + console.info('Web3 not yet initialized, doing so now with HttpProvider.'); - web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); + web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); } diff --git a/interface/client/templates/popupWindows/sendTransactionConfirmation.html b/interface/client/templates/popupWindows/sendTransactionConfirmation.html index 4cc9c5ff8..fc9e25a26 100644 --- a/interface/client/templates/popupWindows/sendTransactionConfirmation.html +++ b/interface/client/templates/popupWindows/sendTransactionConfirmation.html @@ -13,7 +13,8 @@

{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"} {{/if}}
-
+
+
{{#if TemplateVar.get "fromIsContract"}} @@ -54,15 +55,35 @@

{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"}

{{#if transactionInvalid}} -

{{{i18n "mist.popupWindows.sendTransactionConfirmation.estimatedGasError"}}}

+

+ {{i18n "mist.popupWindows.sendTransactionConfirmation.estimatedGasError"}} +

{{else}} - {{#if $and data (TemplateVar.get "toIsContract")}} -

{{{i18n "mist.popupWindows.sendTransactionConfirmation.contractExecutionInfo"}}}

- {{/if}} + {{#unless $eq (TemplateVar.get "gasError") "notEnoughGas"}} + {{#if $eq (TemplateVar.get "gasError") "overBlockGasLimit"}} +
+ {{i18n "mist.popupWindows.sendTransactionConfirmation.overBlockGasLimit"}} +
+ {{else}} + {{#if $and data (TemplateVar.get "toIsContract")}} +

+ {{i18n "mist.popupWindows.sendTransactionConfirmation.contractExecutionInfo"}} +

+ {{/if}} + + {{#unless to}} +

+ {{i18n "mist.popupWindows.sendTransactionConfirmation.contractCreationInfo"}} +

+ {{/unless}} - {{#unless to}} -

{{{i18n "mist.popupWindows.sendTransactionConfirmation.contractCreationInfo"}}}

+ {{/if}} + {{else}} +
+ {{{i18n "mist.popupWindows.sendTransactionConfirmation.notEnoughGas"}}} +
{{/unless}} + {{/if}}
@@ -107,8 +128,8 @@

{{i18n "mist.popupWindows.sendTransactionConfirmation.title.createContract"} {{#if data}} {{#if showFormattedParams}}
-

{{{i18n "mist.popupWindows.sendTransactionConfirmation.parameters"}}} - {{{i18n "mist.popupWindows.sendTransactionConfirmation.showRawBytecode"}}} +

{{i18n "mist.popupWindows.sendTransactionConfirmation.parameters"}} + {{i18n "mist.popupWindows.sendTransactionConfirmation.showRawBytecode"}}

    {{# each param in params}} @@ -121,7 +142,7 @@

    {{{i18n "mist.popupWindows.sendTransactionConfirmation.parameters"}}}

    {{i18n "mist.popupWindows.sendTransactionConfirmation.data"}} {{# if params}} - {{{i18n "mist.popupWindows.sendTransactionConfirmation.showDecodedParameters"}}} + {{i18n "mist.popupWindows.sendTransactionConfirmation.showDecodedParameters"}} {{else}} {{#if to}} {{#unless (TemplateVar.get "lookingUpFunctionSignature")}} @@ -137,6 +158,7 @@

    {{i18n "mist.popupWindows.sendTransactionConfirmation.data"}} {{/if}} {{/if}} +