Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Huhu #514

Open
wants to merge 91 commits into
base: web3.js-1.0.0
Choose a base branch
from
Open

Huhu #514

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
3afdb7f
Updates to master (#430)
evertonfraga Nov 20, 2017
966e6f1
Merge branch 'gh-pages' into master
evertonfraga Nov 20, 2017
326faa8
Build for production
evertonfraga Nov 21, 2017
53605b7
Merge pull request #436 from ethereum/develop
evertonfraga Mar 7, 2018
a367fb3
Adding config file for pullapprove service
evertonfraga Mar 9, 2018
72fe9ee
Remove whos not on contributors list
evertonfraga Mar 9, 2018
a58f4ab
Remove whos not on contributors list
evertonfraga Mar 9, 2018
3dd2de2
Adding Philipp
evertonfraga Mar 9, 2018
e3ff7c7
Triggering status check
evertonfraga Mar 9, 2018
01ff1e2
Merge pull request #470 from ethereum/enable-pull-approve
evertonfraga Mar 9, 2018
e7e23f1
Dummy commit
evertonfraga Mar 9, 2018
f7d027f
Merge pull request #471 from ethereum/test-pull-approve
evertonfraga Mar 9, 2018
e844c6d
Make QR-code ERC-681 compliant (#472)
nagydani Apr 9, 2018
4ba83b6
update Korean translation
hackmod Apr 28, 2018
e058ca2
Merge pull request #469 from ethereum/web3.js-1.0.0
evertonfraga May 23, 2018
c76e7b9
Merge branch 'master' into develop
evertonfraga May 23, 2018
f71fd5d
Merge pull request #477 from ethereum/develop
evertonfraga May 23, 2018
7ae5dfb
Move babel/@runtime to dependencies
ryanio Jun 4, 2018
1eeac1b
Update version
ryanio Jun 4, 2018
b615a48
Improving environment detection; removing yarn.lock; adding npm run b…
evertonfraga Jun 5, 2018
6155c56
Merge pull request #478 from ethereum/babelruntime
evertonfraga Jun 5, 2018
96c3a42
Merge branch 'master' of github.com:ethereum/meteor-dapp-wallet into …
evertonfraga Jun 5, 2018
663ef16
package-lock.json
evertonfraga Jun 5, 2018
e24d201
Using npm run
evertonfraga Jun 5, 2018
0023712
Adding circleci file
evertonfraga Jun 5, 2018
2886f69
Merge pull request #479 from ethereum/mist-mode-helpers
evertonfraga Jun 5, 2018
041a500
Update README.md
ryanio Jun 5, 2018
091939c
Indent
ryanio Jun 5, 2018
68006f7
Add colon
ryanio Jun 5, 2018
39f7768
Adding dependency of ecmascript
evertonfraga Jun 5, 2018
0e08054
Building on circleci
evertonfraga Jun 5, 2018
b0991c1
Building on circleci
evertonfraga Jun 5, 2018
80d67bf
Merge pull request #481 from ethereum/add-core-js
evertonfraga Jun 6, 2018
2163f6a
CI config
evertonfraga Jun 13, 2018
7b41a2f
CI config
evertonfraga Jun 13, 2018
c0ffa23
Merge branch 'master' into update-readme
evertonfraga Jun 13, 2018
7964461
Fixing account button on dashboard
evertonfraga Jun 14, 2018
cbf4fce
Merge pull request #480 from ethereum/update-readme
evertonfraga Jun 14, 2018
807df06
Merge branch 'master' into fix-account-button
evertonfraga Jun 14, 2018
ed498b5
Extract refactoring
evertonfraga Jun 14, 2018
d5d2072
Merge branch 'fix-account-button' of github.com:ethereum/meteor-dapp-…
evertonfraga Jun 14, 2018
6a6463b
Merge pull request #485 from ethereum/fix-account-button
evertonfraga Jun 14, 2018
47dea16
Adds tokens as it finds them
alexvansande Jun 19, 2018
04a0657
Add node_modules to gitignore
ryanio Jun 19, 2018
1d224c6
Cleanup
ryanio Jun 19, 2018
0376bdf
Array#indexOf => Array#includes & cleanup
ryanio Jun 19, 2018
290770d
Better error catching, var => {let,const}
ryanio Jun 19, 2018
3db309e
No need for --rpc when using --ws
ryanio Jun 19, 2018
de10952
Add log when skipping token
ryanio Jun 19, 2018
aaf1aa3
Merge pull request #486 from ethereum/auto-scan-add-as-finds
evertonfraga Jul 23, 2018
337dedb
Updating contract placeholder with constructor syntax
evertonfraga Aug 15, 2018
8d9eb00
Hide gas section if isMist, since we are now handling this inside the…
ryanio Aug 31, 2018
8262ea6
Updated contract.js for broken token list url
berkantaydin Sep 14, 2018
221c3c6
Merge pull request #494 from berkantaydin/broken-tokenListURL-fix
evertonfraga Sep 14, 2018
259bc8c
Merge pull request #476 from OpenCommunityCoin/korean-messages
evertonfraga Sep 14, 2018
42dc878
Merge branch 'master' into hide-gas-for-mist
evertonfraga Sep 14, 2018
633a436
[ImgBot] optimizes images
ImgBotApp Sep 23, 2018
efb0504
Merge pull request #1 from AYIDouble/imgbot
IDouble Sep 23, 2018
305ed1a
Merge branch 'master' into update-contract-placeholder
evertonfraga Oct 4, 2018
6b36a38
Merge pull request #488 from ethereum/update-contract-placeholder
evertonfraga Oct 4, 2018
59fd709
Merge branch 'master' into hide-gas-for-mist
evertonfraga Oct 4, 2018
4b56fc6
Merge branch 'develop' into hide-gas-for-mist
evertonfraga Oct 4, 2018
aaaf261
Merge branch 'master' into master
evertonfraga Oct 5, 2018
299358b
Merge pull request #489 from ethereum/hide-gas-for-mist
ryanio Oct 5, 2018
f680c56
Merge branch 'master' into master
alexvansande Oct 8, 2018
822de4a
Merge pull request #495 from AYIDouble/master
evertonfraga Oct 9, 2018
53048e5
Remove mist warning
evertonfraga Oct 9, 2018
2d48ac4
Add meteor-build-client as devDependency
evertonfraga Oct 9, 2018
f10de4d
Wallet interface
evertonfraga Oct 9, 2018
c8d6c25
Removing CI dependency cache (deterministic CI builds) and simplifyin…
evertonfraga Oct 9, 2018
a1f2608
Fixes autoscan erroring out on invalid token address
ryanio Oct 9, 2018
f3f95bc
Build files
evertonfraga Oct 9, 2018
d93ceaf
Triggering CI job
evertonfraga Oct 9, 2018
f195893
CI: Run npm script inside app dir
evertonfraga Oct 9, 2018
17277b9
CI: Run npm script inside app dir
evertonfraga Oct 9, 2018
3e2ef07
Fixes #4032
ryanio Jul 31, 2018
0f0a6b7
Build files
evertonfraga Oct 9, 2018
f191791
CI: fix cwd
evertonfraga Oct 9, 2018
bd5b521
Import wallet owner check should consider checksum version of address
evertonfraga Oct 9, 2018
b11570f
Refactor: avoiding dense IF statements
evertonfraga Oct 10, 2018
0e24a34
Fix: always return promise
evertonfraga Oct 10, 2018
94e0b23
Prevents log checking for wallet contracts on wallet observer, as it …
evertonfraga Oct 11, 2018
05b2dca
Allows wallet to be re-added, to get out from "Creating..." state
evertonfraga Oct 11, 2018
007b535
Refactor: function extraction
evertonfraga Oct 11, 2018
8d61dbf
Workaround: dealing with both checksum and lowercase addresses
evertonfraga Oct 11, 2018
6625014
Wallet static build
evertonfraga Oct 11, 2018
0263fff
Merge pull request #496 from ethereum/remove-warning
evertonfraga Oct 11, 2018
179803e
Fixes address queries (#501)
evertonfraga Nov 16, 2018
284905f
Static files (#502)
evertonfraga Nov 16, 2018
36d5704
updated babel
frozeman Jun 15, 2020
dd68f84
fixed babel
frozeman Jun 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Javascript Node CircleCI 2.0 configuration file
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:7.10

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

steps:
- checkout
- run: curl https://install.meteor.com/ | sh
- run: cd app && npm install && npm run build


3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ app/packages
app/packages/*
packages/
app/public/i18n/*.json
app/.meteor/dev_bundle
app/.meteor/dev_bundle
app/node_modules
14 changes: 14 additions & 0 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
groups:
code-review:
required: 2
reset_on_push:
enabled: true
users:
- alexvandesande
- evertonfraga
- frozeman
- marcgarreau
- PhilippLgh
- ryanio

7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ node_js: "7"
sudo: required

install:
- npm install -g meteor-build-client
- cd app
- npm install
- curl https://install.meteor.com/ | sh

script:
- cd app
- echo `pwd`
- meteor-build-client ../build --path ""
- npm run build

63 changes: 35 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,64 @@ The Ethereum wallet.

[![Build Status](https://travis-ci.org/ethereum/meteor-dapp-wallet.svg?branch=master)](https://travis-ci.org/ethereum/meteor-dapp-wallet)

**NOTE** The wallet is not yet official released,
can contain severe bugs!
**PLEASE NOTE:** This wallet is not yet officially released,
and can contain severe bugs! Please use at your own risk.

## Install

If you don't have [Meteor](https://www.meteor.com/install):

$ curl https://install.meteor.com/ | sh

Install npm dependencies:

$ cd meteor-dapp-wallet/app
$ npm install

## Development

Start an `geth` node and the app using meteor and open http://localhost:3000 in your browser:
Start a `geth` node:

$ geth --rpc --ws --wsorigins "http://localhost:3000" --unlock <your account>
$ geth --ws --wsorigins "http://localhost:3000" --unlock <your account>

Starting the wallet dapp using [Meteor](https://meteor.com/install)
Run dev server:

$ cd meteor-dapp-wallet/app
$ meteor

Go to http://localhost:3000
Navigate to http://localhost:3000

## Deployment

To create a build version of your app run:
To create a build:

// install meteor-build-client
$ npm install -g meteor-build-client

// bundle dapp
$ npm install -g meteor-build-client
$ cd meteor-dapp-wallet/app
$ npm install
$ meteor-build-client ../build --path ""

This will generate the files in the `../build` folder. Double click the index.html to start the app.
To make routing work properly you need to build it using:
This will generate the files in the `../build` folder.

$ meteor-build-client ../build
Navigating to `index.html` will start the app, but you will need to serve it over a local server like [MAMP](https://www.mamp.info).

And start a local server which points with its document root into the `../build` folder,
so that you can open the app using `http://localhost:80/`
---

To deploy them to the **wallet.ethereum.org** site, execute these commands (from the app folder):
To deploy to the **wallet.ethereum.org** site, execute these commands:

git checkout gh-pages
git merge develop
cd app
meteor-build-client ../build --path "/"
$ git checkout gh-pages
$ git merge develop
$ cd app
$ meteor-build-client ../build --path "/"

And push (or PR) your changes to the gh-pages branch.
And push (or PR) your changes to the `gh-pages` branch.

---

## Gas usage statistics

* Deploy original wallet: 1 230 162
* Deploy wallet stub: 184 280
* Simple Wallet transaction: 64 280
* Multisig Wallet transaction below daily limit: 79 280
* Multisig Wallet transaction above daily limit: 171 096
* 1 Multisig confirmation: 48 363
- Deploy original wallet: 1 230 162
- Deploy wallet stub: 184 280
- Simple Wallet transaction: 64 280
- Multisig Wallet transaction below daily limit: 79 280
- Multisig Wallet transaction above daily limit: 171 096
- 1 Multisig confirmation: 48 363
2 changes: 1 addition & 1 deletion app/client/lib/appStart.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var showModal = function() {
// if in mist, tell to start geth, otherwise start with RPC
var gethRPC = window.mist
? 'geth'
: 'geth --rpc --ws --wsorigins "' +
: 'geth --ws --wsorigins "' +
window.location.protocol +
'//' +
window.location.host +
Expand Down
2 changes: 1 addition & 1 deletion app/client/lib/ethereum/observeTokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ var setupContractSubscription = function(newDocument) {
}
);

// SETUP FILTERS
Helpers.eventLogs(
'Checking Token Transfers for ' +
newDocument.address +
Expand All @@ -52,6 +51,7 @@ var setupContractSubscription = function(newDocument) {
fromBlock: blockToCheckBack,
toBlock: 'latest'
});

events.push(subscription);

// get past logs, to set the new blockNumber
Expand Down
5 changes: 3 additions & 2 deletions app/client/lib/ethereum/observeTransactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ addTransactionAfterSend = function(
to,
gasPrice,
estimatedGas,
data,
rawData,
tokenId
) {
var jsonInterface = undefined,
contractName = undefined,
data = undefined,
txId = Helpers.makeId('tx', txHash);

if (_.isObject(data)) {
contractName = data.contract.name.replace(/([A-Z])/g, ' $1');
jsonInterface = data.contract.jsonInterface;
data = data.data;
data = rawData.data;
}

Transactions.upsert(txId, {
Expand Down
153 changes: 73 additions & 80 deletions app/client/lib/ethereum/walletInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,91 +452,84 @@ checkWalletOwners = function(address) {
info: ''
};

if (web3.utils.isAddress(address)) {
address = address.toLowerCase();
WalletContract.options.address = address;
var myContract = WalletContract;

myContract.m_numOwners(function(e, numberOfOwners) {
if (!e) {
numberOfOwners = numberOfOwners.toNumber();

if (numberOfOwners > 0) {
var owners = [];

// go through the number of owners we stop
P.all(
_.map(_.range(100), function(i) {
return new P(function(resolve, reject) {
web3.eth.getStorageAt(address, 2 + i, function(
e,
ownerAddress
if (!web3.utils.isAddress(address)) return;
address = address.toLowerCase();
WalletContract.options.address = address;
var myContract = WalletContract;

myContract.methods.m_numOwners().call(function(e, numberOfOwners) {
if (e) reject(e);

numberOfOwners = Number(numberOfOwners);
if (numberOfOwners > 0) {
var owners = [];

// go through the number of owners we stop
P.all(
_.map(_.range(numberOfOwners), function(i) {
return new P(function(resolve, reject) {
web3.eth.getStorageAt(address, 2 + i, function(e, ownerAddress) {
if (!e) {
ownerAddress = ownerAddress.replace(
'0x000000000000000000000000',
'0x'
);

ownerAddress = web3.utils.toChecksumAddress(ownerAddress);

if (owners.length > numberOfOwners) return resolve();

if (
web3.utils.isAddress(ownerAddress) &&
ownerAddress !==
'0x0000000000000000000000000000000000000000'
) {
if (!e) {
ownerAddress = ownerAddress.replace(
'0x000000000000000000000000',
'0x'
);

if (owners.length > numberOfOwners) return resolve();

if (
web3.utils.isAddress(ownerAddress) &&
ownerAddress !==
'0x0000000000000000000000000000000000000000'
) {
myContract.isOwner.call(
ownerAddress,
{ from: ownerAddress },
function(e, isOwner) {
if (!e && isOwner) {
owners.push(ownerAddress);
owners = _.uniq(owners);
owners.sort();
}

resolve();
}
);
} else {
myContract.methods
.isOwner(ownerAddress)
.call({ from: ownerAddress }, function(e, isOwner) {
if (!e && isOwner) {
owners.push(ownerAddress);
owners = _.uniq(owners);
owners.sort();
}

resolve();
}
}
});
});
})
).then(
function() {
returnValue.owners = owners;

if ((account = Helpers.getAccountByAddress({ $in: owners }))) {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.youreOwner',
{ account: account.name }
);
} else {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.watchOnly'
);
});
} else {
resolve();
}
}
});
});
})
).then(
function() {
returnValue.owners = owners;

if ((account = Helpers.getAccountByAddress({ $in: owners }))) {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.youreOwner',
{ account: account.name }
);
} else {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.watchOnly'
);
}

resolve(returnValue);
return null;
},
function() {
reject();
}
);
} else {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.notWallet'
);
resolve(returnValue);
return null;
},
function() {
reject();
}
} else {
reject(e);
}
});
}
);
} else {
returnValue.info = TAPi18n.__(
'wallet.newWallet.accountType.import.notWallet'
);
resolve(returnValue);
}
});
});
};
Loading