Skip to content
Permalink
Browse files

Merge pull request gnosis#59 from gnosis/develop

Develop
  • Loading branch information...
denisgranha committed Jan 25, 2018
2 parents b151db4 + 8cc899b commit 716c84e0d6e89b0e2a51526ed5fed8c0cff83a67
@@ -30,6 +30,8 @@ nosetests.xml

# npm
node_modules/
package-lock.json
dapp/package-lock.json

# Compass
.sass-cache
@@ -63,3 +65,13 @@ multisigWallet.zip

# Truffle
/build

# Bower
dapp/bower_components

# Keys
dapp/localhost.crt
dapp/localhost.key

# Travis
.travis/deploy_key
@@ -1,16 +1,38 @@
dist: trusty
language: node_js
node_js:
- "7"
- "8"
- "9"
- '7'
- '8'
- '9'
sudo: required
before_install:
- sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install: npm install && cd dapp && npm install && cd ..
script:
- npm run test-dapp
- npm run test
before_deploy: "rm -rf dapp/node_modules"
deploy:
- provider: s3
bucket: wallet-development
secret_access_key:
secure: FfW1tvr/TMrFYeumFXymGTuz0NmqQvJypuV3BlpbsIcHKKdHb7s210zIHPsKyU2uRjJJGeQCMDzPuI6EHXc4p2cR1o2VPmI2JuXsPjd9SUWJYfxL3/kyhUk+kdyvR+wH8MycddWL0+1XOe8m4K9CERHAUJj3cO2YorrlVVyvaqsZOkNS2gDjBs7+vqUNRgI3CR9f80Tt/m2ib0oWKL9q2nia68F2gVdLyKq70gR1OuH3GAi+cswmdjQMt/twiNWVuRBCXyiFJu2z1vsEmK+GcNvSD6TOWPGJtsWtYmH5rOyzqDrcv/Ee2XeOmgcNKOHCqwR/BgbqMcpmimupuV2WFXUfbxwp+49d7wCW8S6QANnA2H/PS6wcTWwck9vCtOR8CYIWPoMA/711s2YZ+kwoBAVUlaBbTXYlMRVcSmT35PMXuLZ40ixOprPZYJZnt5nTArJiG8g7WTEfqtLUCNztLBiEQNnbc+pfj8h1ddN96kC5NWsyevE7LRsnmILlqrgupON/1E6//xcLZCIIy0PoF+1VAnXBTJHcuQr7ylqVVrm/l5BX+yKAmwD+42ybC0d2LMXQattsI4NLEyzsolsRdiHxLEe3BXO65azHLPZEoh+YeXuiaOXx4gWi8Q9Z1TzVUozRsBjYlOigIBLaFPncd0MM3xJaxjDGwqxw87eLQV8=
access_key_id:
secure: B3CEVnnj56OEqbbYdFOpG7lgkuhiZOr+1Iao/Jbsvqv6uAqDRU4mQY0WS+crJ8N3evQcJbW3F9CwAYH6IRy7k7Is4F/6nXr6eqlAz0ovNlSOKg8wxGg5bzI3Eg6meX3gy1nXSmvGNWyzBH4vPFwII8NpoqkVpeqUv7h16tXjDjw+UxeYyVICauzzbZOoVFAPLBj0E4IHMgtem1e4hWVvZnpO8x2sz8TNIDxiHxIakA9VqbHuWOuQ4uzoQm00FiuGY/iiGHG10UWScKIirWGtKwHPenPoB5F/KefuBOpJkJ8n7ir0uITbok1RASTw6hJevAKSqCBmIFdDR34AZtbT57Fw9JjC5Mhedeaz33xOz9Nu7bfUEH+JPq1MIYr88s1J1jaNJj4vFfPaYYjxXBA1CS9KzUo48VA4k+cX56h4sOkGCnGuTdTbL2UahyVjJy3mMcGI2Mq0xDipoyQSMM7Bhec21HcgE3gaFS2QAjbDVFQLonqpnaqshRGmXXCFBkP8kh0HhS3Ackq04wUR/1P7JpTTqslK9X9e9WcLQkNc+sGsFqaKETXBc5fZfDtZwvJOOeZnbOhO2mfDazHJJYKooMcTKTtWJhPSkjiqw6hcNUKE7gL/XSA9JraO6yYru/MCiBMNVVkWtbPBm83sLwTsd3EySLBp+XSP1JGD3FBV9Sw=
skip_cleanup: true
local_dir: dapp
on:
branch: develop
- provider: s3
bucket: wallet-staging
secret_access_key:
secure: FfW1tvr/TMrFYeumFXymGTuz0NmqQvJypuV3BlpbsIcHKKdHb7s210zIHPsKyU2uRjJJGeQCMD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q0xDipoyQSMM7Bhec21HcgE3gaFS2QAjbDVFQLonqpnaqshRGmXXCFBkP8kh0HhS3Ackq04wUR/1P7JpTTqslK9X9e9WcLQkNc+sGsFqaKETXBc5fZfDtZwvJOOeZnbOhO2mfDazHJJYKooMcTKTtWJhPSkjiqw6hcNUKE7gL/XSA9JraO6yYru/MCiBMNVVkWtbPBm83sLwTsd3EySLBp+XSP1JGD3FBV9Sw=
skip_cleanup: true
local_dir: dapp
on:
branch: master

This file was deleted.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -158,7 +158,7 @@ var txDefault = {
},
'kovan': {
name: 'Kovan',
address: '0x6C4c60F01999408CfD872Fdcf739912509A15da5'
address: '0x2c992817e0152a65937527b774c7a99a84603045'
},
'privatenet': {
name: 'Privatenet',
@@ -167,6 +167,24 @@ var txDefault = {
}
};

var oldWalletFactoryAddresses = [
("0x12ff9a987c648c5608b2c2a76f58de74a3bf1987").toLowerCase(),
("0xed5a90efa30637606ddaf4f4b3d42bb49d79bd4e").toLowerCase(),
("0xa0dbdadcbcc540be9bf4e9a812035eb1289dad73").toLowerCase()
];

/**
* Update the default wallet factory address in local storage
*/
function checkWalletFactoryAddress() {
var userConfig = JSON.parse(localStorage.getItem("userConfig"));

if (userConfig && oldWalletFactoryAddresses.indexOf(userConfig.walletFactoryAddress.toLowerCase()) >= 0) {
userConfig.walletFactoryAddress = txDefaultOrig.walletFactoryAddress;
localStorage.setItem("userConfig", JSON.stringify(userConfig));
}
}

/**
* Reload configuration
*/
@@ -175,4 +193,5 @@ function loadConfiguration () {
Object.assign(txDefault, txDefaultOrig, userConfig);
}

checkWalletFactoryAddress();
loadConfiguration();
@@ -5,12 +5,14 @@
.controller("depositCtrl", function ($scope, Transaction, $routeParams, $uibModalInstance, Wallet, Utils, wallet, Web3Service) {
$scope.wallet = wallet;
$scope.amount = 10;
$scope.deposit = function () {
$scope.deposit = function () {
Transaction.send(
{
to: $scope.wallet.address,
from: Web3Service.coinbase,
value: new ethereumjs.BN(new Web3().toWei($scope.amount))
value: new ethereumjs.BN(new Web3().toWei($scope.amount)),
gas: 50000,
gasPrice: Wallet.txParams.gasPrice
},
function (e, tx) {
if (e) {
@@ -13,6 +13,7 @@

$scope.confirmations = 1;
$scope.limit = 0;
$scope.maxAllowedConfirmations = 1;

$scope.removeOwner = function (address) {
delete $scope.owners[address];
@@ -102,6 +103,7 @@
$scope.addOwner = function () {
$scope.owners[$scope.newOwner.address] = $scope.newOwner;
$scope.newOwner = {}; // reset values
$scope.maxAllowedConfirmations = Object.keys($scope.owners).length
};
});
}
@@ -58,6 +58,14 @@
factoryAddress = $scope.config.walletFactoryAddresses['kovan'];
alertNode = $scope.config.alertNodes['kovan'];
}
else if (data.chain == 'ropsten') {
factoryAddress = $scope.config.walletFactoryAddresses['ropsten'];
alertNode = $scope.config.alertNodes['ropsten'];
}
else if (data.chain == 'privatenet') {
factoryAddress = $scope.config.walletFactoryAddresses['privatenet'];
alertNode = $scope.config.alertNodes['privatenet'];
}
else {
factoryAddress = $scope.config.walletFactoryAddresses['mainnet'];
alertNode = $scope.config.alertNodes['mainnet'];
@@ -46,23 +46,15 @@
function () {
Wallet.initParams().then(
function () {
// Check withdraw with value 0
var validWithdraw = true;
if (element.length && element[0].attributes && element[0].attributes['data-action'] && element[0].attributes['data-action'].nodeValue == "withdraw") {
if (scope.wallet && scope.wallet.maxWithdraw && scope.wallet.maxWithdraw.eq(0)) {
validWithdraw = false;
}
}

if (scope.wallet && scope.wallet.isOnChain == true && validWithdraw) {
if (scope.wallet && scope.wallet.isOnChain == true) {
element.removeAttr('disabled');
}
else if (attrs.disabledIfNoAccountsOrWalletAvailable) {
var address = attrs.disabledIfNoAccountsOrWalletAvailable;
Wallet.getOwners(
address,
function (e, owners) {
if (!e && owners.length > 0 && Web3Service.coinbase && validWithdraw) {
if (!e && owners.length > 0 && Web3Service.coinbase) {
element.removeAttr('disabled');
}
else {
@@ -73,7 +65,7 @@
}
else {
scope.$watch(function(){
if(Web3Service.coinbase && validWithdraw) {
if(Web3Service.coinbase) {
element.removeAttr('disabled');
}
else {
@@ -4,9 +4,6 @@
<title>Multisignature Wallet</title>
<script src="./bower_components/web3/dist/web3.js">
</script>
<script>
var Web3Local = Web3;
</script>
<script>
// Detect if it's an Electron app or not
var isElectron = (window && window.process && window.process.type) ? true : false;
@@ -0,0 +1,29 @@
<div class="modal-header">
<h3 class="modal-title">
Configure Gas
</h3>
</div>
<div class="modal-body">
<div class="form-group">
<label for="value">Gas limit:</label>
<input id="value" type="number" class="form-control" ng-model="gasLimit" step="any" ng-change="calculateFee()"
min="0" max="999999999999999" required >
</div>
<div class="form-group">
<label for="value">Gas price (GWei):</label>
<input id="value" type="number" class="form-control" ng-model="gasPrice" step="any" min="0" ng-change="calculateFee()"
max="999999999999999" required >
</div>
<div class="form-group">
<label for="value">Tx fees (ETH):</label>
<input id="value" disabled type="number" class="form-control" ng-model="txFee" step="any" min="0" max="999999999999999" required >
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" ng-click="send()">
Send transaction
</button>
<button type="button" class="btn btn-danger" ng-click="cancel()">
Cancel
</button>
</div>
@@ -11,7 +11,7 @@ <h3 class="modal-title">
</div>
<div class="form-group">
<label for="required">Required confirmations</label>
<input id="required" type="number" class="form-control" ng-min="1" ng-max="owners.length" ng-model="confirmations" required />
<input id="required" type="number" class="form-control" ng-min="1" ng-max="{{maxAllowedConfirmations}}" ng-model="confirmations" required />
</div>
<div class="form-group">
<label for="daily-limit"> Daily limit (ETH) </label>
@@ -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" />
@@ -46,11 +46,7 @@ <h4>
</button>
<button type="button" class="btn btn-danger btn-sm" ng-click="removeWallet(wallet.address)">
Remove
</button>
<button type="button" class="btn btn-primary btn-sm" ng-click="openNotifications(wallet.address)"
disabled-if-no-accounts-or-wallet-available="{{wallet.address}}">
Notifications
</button>
</button>
</div>
</td>
<td>
@@ -305,22 +305,22 @@
else if (block && block.hash == "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3") {
data.chain = "mainnet";
data.etherscan = "https://etherscan.io";
data.walletFactoryAddress = "0xed5a90efa30637606ddaf4f4b3d42bb49d79bd4e";
data.walletFactoryAddress = txDefault.walletFactoryAddresses["mainnet"].address;
}
else if (block && block.hash == "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") {
data.chain = "ropsten";
data.etherscan = "https://ropsten.etherscan.io";
data.walletFactoryAddress = "0x5cb85db3e237cac78cbb3fd63e84488cac5bd3dd";
data.walletFactoryAddress = txDefault.walletFactoryAddresses["ropsten"].address;
}
else if (block && block.hash == "0xa3c565fc15c7478862d50ccd6561e3c06b24cc509bf388941c25ea985ce32cb9") {
data.chain = "kovan";
data.etherscan = "https://kovan.etherscan.io";
data.walletFactoryAddress = "0xa0dbdadcbcc540be9bf4e9a812035eb1289dad73";
data.walletFactoryAddress = txDefault.walletFactoryAddresses["kovan"].address;
}
else {
data.chain = "privatenet";
data.etherscan = "https://testnet.etherscan.io";
data.walletFactoryAddress = "0xd79426bcee5b46fde413ededeb38364b3e666097";
data.walletFactoryAddress = txDefault.walletFactoryAddresses["privatenet"].address;
}

resolve(data);
Oops, something went wrong.

0 comments on commit 716c84e

Please sign in to comment.
You can’t perform that action at this time.