Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #53 from gnosis/feature/fixed-gas-limit
Browse files Browse the repository at this point in the history
Feature/fixed gas limit
  • Loading branch information
denisgranha committed Jan 23, 2018
2 parents e3f691c + 9e87e7d commit fefb811
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions dapp/abi.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dapp/config.js
Expand Up @@ -158,7 +158,7 @@ var txDefault = {
},
'kovan': {
name: 'Kovan',
address: '0x6C4c60F01999408CfD872Fdcf739912509A15da5'
address: '0x2c992817e0152a65937527b774c7a99a84603045'
},
'privatenet': {
name: 'Privatenet',
Expand Down
2 changes: 1 addition & 1 deletion dapp/partials/settings.html
Expand Up @@ -26,7 +26,7 @@ <h4>
</provider-list>
</div>
</div>
<div class="row">
<div class="row" show-hide-by-connectivity="offline">
<div class="col-md-6 form-group">
<label for="gas-limit">Gas limit</label>
<input id="gas-limit" type="number" ng-model="config.gasLimit" class="form-control" />
Expand Down
19 changes: 10 additions & 9 deletions dapp/services/Wallet.js
Expand Up @@ -2,8 +2,7 @@
function () {
angular
.module('multiSigWeb')
.service('Wallet', function ($window, $http, $q, $rootScope, $uibModal, Utils, ABI, Connection, Web3Service) {

.service('Wallet', function ($window, $http, $q, $rootScope, $uibModal, Utils, ABI, Connection, Web3Service) {
// Init wallet factory object
var wallet = {
wallets: JSON.parse(localStorage.getItem("wallets")) || {},
Expand Down Expand Up @@ -540,7 +539,8 @@
requiredConfirmations,
limit,
wallet.txDefaults({
data: wallet.json.multiSigDailyLimit.binHex
data: wallet.json.multiSigDailyLimit.binHex,
gas: (2556980 + 42733 * owners.length) // Gas to create multisig with dynamic gas for owners
}),
cb
);
Expand All @@ -554,7 +554,8 @@
requiredConfirmations,
limit,
wallet.txDefaults({
data: wallet.json.multiSigDailyLimit.binHex
data: wallet.json.multiSigDailyLimit.binHex,
gas: (2002000 + 27820 * owners.length)
}),
cb
);
Expand Down Expand Up @@ -670,7 +671,7 @@
"0x0",
data,
count,
wallet.txDefaults()
wallet.txDefaults({gas: 300000})
],
options,
cb
Expand Down Expand Up @@ -724,7 +725,7 @@
"0x0",
data,
count,
wallet.txDefaults()
wallet.txDefaults({gas: 300000})
],
options,
cb
Expand Down Expand Up @@ -779,7 +780,7 @@
"0x0",
data,
count,
wallet.txDefaults()
wallet.txDefaults({gas: 300000})
],
options,
cb
Expand Down Expand Up @@ -838,7 +839,7 @@
"0x0",
data,
count,
wallet.txDefaults()
wallet.txDefaults({gas: 300000})
],
options,
cb
Expand Down Expand Up @@ -983,7 +984,7 @@
"0x0",
data,
count,
wallet.txDefaults()
wallet.txDefaults({gas: 300000})
],
options,
cb
Expand Down
13 changes: 7 additions & 6 deletions dapp/services/Web3Service.js
Expand Up @@ -4,7 +4,7 @@
.module('multiSigWeb')
.service("Web3Service", function ($window, $q, Utils, $uibModal, Connection, Config, $http) {

factory = {};
var factory = {};

factory.webInitialized = $q(function (resolve, reject) {
window.addEventListener('load', function () {
Expand Down Expand Up @@ -78,23 +78,24 @@
cb(e);
}
else {
if (result) {
if (result) {
method.sendTransaction.apply(method.sendTransaction, params.concat(cb));
}
else {
cb("Simulated transaction failed");
}
}
}


var args;
if ( options && options.onlySimulate) {
var args = params.concat(cb);
args = params.concat(cb);
method.call.apply(method.call, args);
}
else {
var args = params.concat(sendIfSuccess);
args = params.concat(sendIfSuccess);
method.call.apply(method.call, args);
}
}
};

/**
Expand Down

0 comments on commit fefb811

Please sign in to comment.