diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 94ac69d2c..2460678d4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -401,7 +401,7 @@ test-darwin:
- git submodule update --init --recursive
script:
- export RUST_BACKTRACE=1
- - ./test.sh $CARGOFLAGS --no-release
+ - ./test.sh $CARGOFLAGS
tags:
- osx
allow_failure: true
@@ -428,7 +428,7 @@ test-rust-stable:
script:
- export RUST_BACKTRACE=1
- echo $JS_FILES_MODIFIED
- - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"&./test.sh $CARGOFLAGS --no-release; else echo "skip rust test"&./js/scripts/lint.sh&./js/scripts/test.sh&./js/scripts/build.sh; fi
+ - if [ "$JS_FILES_MODIFIED" = 0 ]; then echo "skip js test"&./test.sh $CARGOFLAGS; else echo "skip rust test"&./js/scripts/lint.sh&./js/scripts/test.sh&./js/scripts/build.sh; fi
tags:
- rust
- rust-stable
@@ -457,7 +457,7 @@ test-rust-beta:
script:
- export RUST_BACKTRACE=1
- echo $JS_FILES_MODIFIED
- - ./test.sh $CARGOFLAGS --no-release
+ - ./test.sh $CARGOFLAGS
tags:
- rust
- rust-beta
@@ -471,7 +471,7 @@ test-rust-nightly:
- git submodule update --init --recursive
script:
- export RUST_BACKTRACE=1
- - ./test.sh $CARGOFLAGS --no-release
+ - ./test.sh $CARGOFLAGS
tags:
- rust
- rust-nightly
diff --git a/.travis.yml b/.travis.yml
index 6f3fd9933..f1e02396b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,7 @@ git:
matrix:
include:
- rust: stable
- env: RUN_TESTS="true" TEST_OPTIONS="--no-release"
+ env: RUN_TESTS="true" TEST_OPTIONS=""
- rust: stable
env: RUN_COVERAGE="true"
- rust: stable
@@ -71,8 +71,7 @@ install:
script:
- if [ "$RUN_TESTS" = "true" ]; then
./js/scripts/lint.sh &&
- ./js/scripts/test.sh &&
- ./test.sh $TEST_OPTIONS --verbose;
+ travis_wait 40 ./test.sh $TEST_OPTIONS;
fi
- if [ "$RUN_COVERAGE" = "true" ]; then ./scripts/cov.sh "$KCOV_CMD"; fi
diff --git a/Cargo.lock b/Cargo.lock
index 05d6312ec..f603410f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,18 +10,18 @@ dependencies = [
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.5.0",
"ethcore-dapps 1.5.0",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-hash-fetch 1.5.0",
"ethcore-io 1.5.0",
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
"ethcore-ipc-hypervisor 1.2.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-ipc-nano 1.5.0",
"ethcore-ipc-tests 0.1.0",
"ethcore-logger 1.5.0",
"ethcore-rpc 1.5.0",
"ethcore-signer 1.5.0",
- "ethcore-stratum 1.4.0",
+ "ethcore-stratum 1.5.0",
"ethcore-util 1.5.0",
"ethsync 1.5.0",
"fdlimit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -273,7 +273,7 @@ dependencies = [
[[package]]
name = "ethash"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -291,18 +291,18 @@ dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethash 1.4.0",
+ "ethash 1.5.0",
"ethcore-bloom-journal 0.1.0",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-io 1.5.0",
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
+ "ethcore-ipc-nano 1.5.0",
"ethcore-util 1.5.0",
"ethjson 0.1.0",
"ethkey 0.2.0",
"ethstore 0.1.0",
- "evmjit 1.4.0",
+ "evmjit 1.5.0",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.10.0-a.0 (git+https://github.com/ethcore/hyper)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -343,7 +343,7 @@ version = "1.5.0"
dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-hash-fetch 1.5.0",
"ethcore-rpc 1.5.0",
"ethcore-util 1.5.0",
@@ -356,7 +356,7 @@ dependencies = [
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "parity-ui 1.4.0",
+ "parity-ui 1.5.0",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -370,7 +370,7 @@ dependencies = [
[[package]]
name = "ethcore-devtools"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -400,9 +400,9 @@ dependencies = [
[[package]]
name = "ethcore-ipc"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-util 1.5.0",
"nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)",
"semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -410,7 +410,7 @@ dependencies = [
[[package]]
name = "ethcore-ipc-codegen"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"aster 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -423,9 +423,9 @@ dependencies = [
name = "ethcore-ipc-hypervisor"
version = "1.2.0"
dependencies = [
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
+ "ethcore-ipc-nano 1.5.0",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)",
"semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -434,9 +434,9 @@ dependencies = [
[[package]]
name = "ethcore-ipc-nano"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
- "ethcore-ipc 1.4.0",
+ "ethcore-ipc 1.5.0",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)",
@@ -446,10 +446,10 @@ dependencies = [
name = "ethcore-ipc-tests"
version = "0.1.0"
dependencies = [
- "ethcore-devtools 1.4.0",
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-devtools 1.5.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
+ "ethcore-ipc-nano 1.5.0",
"ethcore-util 1.5.0",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"nanomsg 0.5.1 (git+https://github.com/ethcore/nanomsg.rs.git)",
@@ -475,7 +475,7 @@ version = "1.5.0"
dependencies = [
"ansi_term 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-io 1.5.0",
"ethcore-util 1.5.0",
"ethcrypto 0.1.0",
@@ -499,11 +499,11 @@ name = "ethcore-rpc"
version = "1.5.0"
dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethash 1.4.0",
+ "ethash 1.5.0",
"ethcore 1.5.0",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-io 1.5.0",
- "ethcore-ipc 1.4.0",
+ "ethcore-ipc 1.5.0",
"ethcore-util 1.5.0",
"ethcrypto 0.1.0",
"ethjson 0.1.0",
@@ -530,14 +530,14 @@ version = "1.5.0"
dependencies = [
"clippy 0.0.103 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"ethcore-io 1.5.0",
"ethcore-rpc 1.5.0",
"ethcore-util 1.5.0",
"jsonrpc-core 4.0.0 (git+https://github.com/ethcore/jsonrpc.git)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "parity-ui 1.4.0",
+ "parity-ui 1.5.0",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"ws 0.5.3 (git+https://github.com/ethcore/ws-rs.git?branch=mio-upstream-stable)",
@@ -545,13 +545,13 @@ dependencies = [
[[package]]
name = "ethcore-stratum"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "ethcore-devtools 1.4.0",
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-devtools 1.5.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
+ "ethcore-ipc-nano 1.5.0",
"ethcore-util 1.5.0",
"jsonrpc-core 4.0.0 (git+https://github.com/ethcore/jsonrpc.git)",
"jsonrpc-tcp-server 0.1.0 (git+https://github.com/ethcore/jsonrpc.git)",
@@ -573,7 +573,7 @@ dependencies = [
"eth-secp256k1 0.5.4 (git+https://github.com/ethcore/rust-secp256k1)",
"ethcore-bigint 0.1.2",
"ethcore-bloom-journal 0.1.0",
- "ethcore-devtools 1.4.0",
+ "ethcore-devtools 1.5.0",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -661,9 +661,9 @@ dependencies = [
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ethcore 1.5.0",
"ethcore-io 1.5.0",
- "ethcore-ipc 1.4.0",
- "ethcore-ipc-codegen 1.4.0",
- "ethcore-ipc-nano 1.4.0",
+ "ethcore-ipc 1.5.0",
+ "ethcore-ipc-codegen 1.5.0",
+ "ethcore-ipc-nano 1.5.0",
"ethcore-network 1.5.0",
"ethcore-util 1.5.0",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -677,7 +677,7 @@ dependencies = [
[[package]]
name = "evmjit"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"tiny-keccak 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1254,7 +1254,7 @@ dependencies = [
[[package]]
name = "parity-ui"
-version = "1.4.0"
+version = "1.5.0"
dependencies = [
"parity-ui-dev 1.4.0",
"parity-ui-precompiled 1.4.0 (git+https://github.com/ethcore/js-precompiled.git)",
@@ -1271,7 +1271,7 @@ dependencies = [
[[package]]
name = "parity-ui-precompiled"
version = "1.4.0"
-source = "git+https://github.com/ethcore/js-precompiled.git#c3e0b5772f508d9261e8b10141edcad2e8212005"
+source = "git+https://github.com/ethcore/js-precompiled.git#a59b62ecec8773715d1db7e070bbbe5443eb7378"
dependencies = [
"parity-dapps-glue 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/Cargo.toml b/Cargo.toml
index 078d2916c..65bb0dbc6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -88,4 +88,4 @@ name = "parity"
[profile.release]
debug = false
lto = false
-
+panic = "abort"
diff --git a/dapps/js-glue/Cargo.toml b/dapps/js-glue/Cargo.toml
index b85122e90..827c67ef5 100644
--- a/dapps/js-glue/Cargo.toml
+++ b/dapps/js-glue/Cargo.toml
@@ -1,7 +1,7 @@
[package]
description = "Base Package for all Parity built-in dapps"
name = "parity-dapps-glue"
-version = "1.4.0"
+version = "1.5.0"
license = "GPL-3.0"
authors = ["Ethcore "]
[build-dependencies]
diff --git a/db/Cargo.toml b/db/Cargo.toml
index 2b4a19892..9642ed882 100644
--- a/db/Cargo.toml
+++ b/db/Cargo.toml
@@ -3,7 +3,7 @@ description = "Ethcore Database"
homepage = "http://ethcore.io"
license = "GPL-3.0"
name = "ethcore-db"
-version = "1.4.0"
+version = "1.5.0"
authors = ["Ethcore "]
build = "build.rs"
diff --git a/devtools/Cargo.toml b/devtools/Cargo.toml
index 77b05b4cc..3b648c450 100644
--- a/devtools/Cargo.toml
+++ b/devtools/Cargo.toml
@@ -3,7 +3,7 @@ description = "Ethcore development/test/build tools"
homepage = "http://ethcore.io"
license = "GPL-3.0"
name = "ethcore-devtools"
-version = "1.4.0"
+version = "1.5.0"
authors = ["Ethcore "]
[dependencies]
diff --git a/ethash/Cargo.toml b/ethash/Cargo.toml
index d2fb37d94..bf1ba990e 100644
--- a/ethash/Cargo.toml
+++ b/ethash/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ethash"
-version = "1.4.0"
+version = "1.5.0"
authors = ["arkpar Result<(), Error> {
+ Ok(self.address_book.write().remove(addr))
+ }
+
/// Returns each account along with name and meta.
pub fn accounts_info(&self) -> Result, Error> {
let r: HashMap = try!(self.sstore.accounts())
diff --git a/ethcore/src/account_provider/stores.rs b/ethcore/src/account_provider/stores.rs
index cfc81f495..8bf555d68 100644
--- a/ethcore/src/account_provider/stores.rs
+++ b/ethcore/src/account_provider/stores.rs
@@ -74,6 +74,12 @@ impl AddressBook {
}
self.save();
}
+
+ /// Removes an entry
+ pub fn remove(&mut self, a: Address) {
+ self.cache.remove(&a);
+ self.save();
+ }
}
/// Dapps user settings
@@ -244,4 +250,22 @@ mod tests {
}
]);
}
+
+ #[test]
+ fn should_remove_address() {
+ let temp = RandomTempPath::create_dir();
+ let path = temp.as_str().to_owned();
+ let mut b = AddressBook::new(path.clone());
+
+ b.set_name(1.into(), "One".to_owned());
+ b.set_name(2.into(), "Two".to_owned());
+ b.set_name(3.into(), "Three".to_owned());
+ b.remove(2.into());
+
+ let b = AddressBook::new(path);
+ assert_eq!(b.get(), hash_map![
+ 1.into() => AccountMeta{name: "One".to_owned(), meta: "{}".to_owned(), uuid: None},
+ 3.into() => AccountMeta{name: "Three".to_owned(), meta: "{}".to_owned(), uuid: None}
+ ]);
+ }
}
diff --git a/evmjit/Cargo.toml b/evmjit/Cargo.toml
index b7a4d1447..12c57a769 100644
--- a/evmjit/Cargo.toml
+++ b/evmjit/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "evmjit"
-version = "1.4.0"
+version = "1.5.0"
authors = ["debris "]
[lib]
diff --git a/ipc/codegen/Cargo.toml b/ipc/codegen/Cargo.toml
index 1c61db49f..2867609d6 100644
--- a/ipc/codegen/Cargo.toml
+++ b/ipc/codegen/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ethcore-ipc-codegen"
-version = "1.4.0"
+version = "1.5.0"
authors = ["Nikolay Volf"]
license = "GPL-3.0"
description = "Macros to auto-generate implementations for ipc call"
diff --git a/ipc/nano/Cargo.toml b/ipc/nano/Cargo.toml
index b358eb23a..32171bbf4 100644
--- a/ipc/nano/Cargo.toml
+++ b/ipc/nano/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ethcore-ipc-nano"
-version = "1.4.0"
+version = "1.5.0"
authors = ["Nikolay Volf "]
license = "GPL-3.0"
diff --git a/ipc/rpc/Cargo.toml b/ipc/rpc/Cargo.toml
index 9e0dfd91b..1aecb3292 100644
--- a/ipc/rpc/Cargo.toml
+++ b/ipc/rpc/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "ethcore-ipc"
-version = "1.4.0"
+version = "1.5.0"
authors = ["Nikolay Volf "]
license = "GPL-3.0"
diff --git a/js/package.json b/js/package.json
index d09b100b0..62bf37b49 100644
--- a/js/package.json
+++ b/js/package.json
@@ -1,6 +1,6 @@
{
"name": "parity.js",
- "version": "0.2.96",
+ "version": "0.2.99",
"main": "release/index.js",
"jsnext:main": "src/index.js",
"author": "Parity Team ",
diff --git a/js/scripts/release.sh b/js/scripts/release.sh
index 3ff4a577c..1cf3095ef 100755
--- a/js/scripts/release.sh
+++ b/js/scripts/release.sh
@@ -34,11 +34,18 @@ git fetch origin 2>$GITLOG
git checkout -b $BRANCH
echo "*** Committing compiled files for $UTCDATE"
+mv build ../build.new
git add .
-git commit -m "$UTCDATE"
+git commit -m "$UTCDATE [update]"
+git merge origin/$BRANCH -X ours --commit -m "$UTCDATE [merge]"
+git rm -r build
+rm -rf build
+git commit -m "$UTCDATE [cleanup]"
+mv ../build.new build
+git add .
+git commit -m "$UTCDATE [release]"
echo "*** Merging remote"
-git merge origin/$BRANCH -X ours --commit -m "$UTCDATE [release]"
git push origin HEAD:refs/heads/$BRANCH 2>$GITLOG
PRECOMPILED_HASH=`git rev-parse HEAD`
diff --git a/js/scripts/test.js b/js/scripts/test.js
new file mode 100644
index 000000000..318fd7c84
--- /dev/null
+++ b/js/scripts/test.js
@@ -0,0 +1 @@
+// test script 4
diff --git a/js/src/api/format/input.js b/js/src/api/format/input.js
index 6d261c674..16fbd4d2e 100644
--- a/js/src/api/format/input.js
+++ b/js/src/api/format/input.js
@@ -112,11 +112,15 @@ export function inNumber10 (number) {
}
export function inNumber16 (number) {
- if (isInstanceOf(number, BigNumber)) {
- return inHex(number.toString(16));
+ const bn = isInstanceOf(number, BigNumber)
+ ? number
+ : (new BigNumber(number || 0));
+
+ if (!bn.isInteger()) {
+ throw new Error(`[format/input::inNumber16] the given number is not an integer: ${bn.toFormat()}`);
}
- return inHex((new BigNumber(number || 0)).toString(16));
+ return inHex(bn.toString(16));
}
export function inOptions (options) {
@@ -130,6 +134,9 @@ export function inOptions (options) {
case 'gas':
case 'gasPrice':
+ options[key] = inNumber16((new BigNumber(options[key])).round());
+ break;
+
case 'value':
case 'nonce':
options[key] = inNumber16(options[key]);
diff --git a/js/src/api/rpc/parity/parity.js b/js/src/api/rpc/parity/parity.js
index ac16eb9b0..7dd5b7eb3 100644
--- a/js/src/api/rpc/parity/parity.js
+++ b/js/src/api/rpc/parity/parity.js
@@ -128,6 +128,11 @@ export default class Parity {
.execute('parity_killAccount', inAddress(account), password);
}
+ removeAddress (address) {
+ return this._transport
+ .execute('parity_removeAddress', inAddress(address));
+ }
+
listGethAccounts () {
return this._transport
.execute('parity_listGethAccounts')
diff --git a/js/src/api/subscriptions/personal.js b/js/src/api/subscriptions/personal.js
index 2cb0c3ea0..82671184e 100644
--- a/js/src/api/subscriptions/personal.js
+++ b/js/src/api/subscriptions/personal.js
@@ -68,6 +68,7 @@ export default class Personal {
this._accountsInfo();
return;
+ case 'parity_removeAddress':
case 'parity_setAccountName':
case 'parity_setAccountMeta':
this._accountsInfo();
diff --git a/js/src/contracts/code/wallet.js b/js/src/contracts/code/wallet.js
index a4db4459b..94aa04b7b 100644
--- a/js/src/contracts/code/wallet.js
+++ b/js/src/contracts/code/wallet.js
@@ -19,5 +19,5 @@
* @from https://github.com/ethereum/dapp-bin/blob/dd5c485359074d49f571693ae064ce78970f3d6d/wallet/wallet.sol
* @date 22-Nov-2016 @ 15h00 UTC
*/
-export default '0x606060405234620000005760405162001a0638038062001a06833981016040528080518201919060200180519060200190919080519060200190919050505b805b83835b600060018351016001819055503373ffffffffffffffffffffffffffffffffffffffff166002600161010081101562000000570160005b5081905550600161010260003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600090505b825181101562000158578281815181101562000000579060200190602002015173ffffffffffffffffffffffffffffffffffffffff1660028260020161010081101562000000570160005b50819055508060020161010260008584815181101562000000579060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b806001019050620000b4565b816000819055505b5050508061010581905550620001896200019c6401000000000262001832176401000000009004565b610107819055505b505b505050620001b1565b60006201518042811562000000570490505b90565b61184680620001c06000396000f3606060405236156100f4576000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461015c5780632f54bf6e146101795780634123cb6b146101ac57806352375093146101cf5780635c52c2f5146101f2578063659010e7146102015780637065cb4814610224578063746c917114610241578063797af62714610264578063b20d30a914610297578063b61d27f6146102b4578063b75c7dc614610306578063ba51a6df14610323578063c2cf732614610340578063c41a360a1461037c578063cbf0b0c0146103c3578063f00d4b5d146103e0578063f1736d8614610406575b61015a5b6000341115610157577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b34610000576101776004808035906020019091905050610429565b005b34610000576101946004808035906020019091905050610553565b60405180821515815260200191505060405180910390f35b34610000576101b961058b565b6040518082815260200191505060405180910390f35b34610000576101dc610591565b6040518082815260200191505060405180910390f35b34610000576101ff610598565b005b346100005761020e6105d3565b6040518082815260200191505060405180910390f35b346100005761023f60048080359060200190919050506105da565b005b346100005761024e61070d565b6040518082815260200191505060405180910390f35b346100005761027f6004808035906020019091905050610713565b60405180821515815260200191505060405180910390f35b34610000576102b26004808035906020019091905050610abf565b005b34610000576102ec60048080359060200190919080359060200190919080359060200190820180359060200191909192905050610afa565b604051808260001916815260200191505060405180910390f35b34610000576103216004808035906020019091905050610e68565b005b346100005761033e6004808035906020019091905050610f5f565b005b34610000576103646004808035906020019091908035906020019091905050610fe7565b60405180821515815260200191505060405180910390f35b34610000576103976004808035906020019091905050611065565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34610000576103de6004808035906020019091905050611085565b005b346100005761040460048080359060200190919080359060200190919050506110d0565b005b3461000057610413611254565b6040518082815260200191505060405180910390f35b60006000366040518083838082843782019150509250505060405180910390206104528161125b565b1561054d5761010260008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054915060008214156104925761054c565b60016001540360005411156104a65761054c565b6000600283610100811015610000570160005b5081905550600061010260008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506104f661147f565b6104fe61157a565b7f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b505050565b6000600061010260008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541190505b919050565b60015481565b6101075481565b6000366040518083838082843782019150509250505060405180910390206105bf8161125b565b156105cf576000610106819055505b5b5b50565b6101065481565b6000366040518083838082843782019150509250505060405180910390206106018161125b565b156107085761060f82610553565b1561061957610707565b61062161147f565b60fa6001541015156106365761063561157a565b5b60fa60015410151561064757610707565b6001600081548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600154610100811015610000570160005b508190555060015461010260008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5b5b5050565b60005481565b60008161071f8161125b565b15610ab857600061010860008560001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ab65761010860008460001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661010860008560001916815260200190815260200160002060010154610108600086600019168152602001908152602001600020600201604051808280546001816001161561010002031660029004801561086d5780601f106108425761010080835404028352916020019161086d565b820191906000526020600020905b81548152906001019060200180831161085057829003601f168201915b505091505060006040518083038185876185025a03f192505050507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a33846101086000876000191681526020019081526020016000206001015461010860008860001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610108600089600019168152602001908152602001600020600201604051808673ffffffffffffffffffffffffffffffffffffffff168152602001856000191681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156109ef5780601f106109c4576101008083540402835291602001916109ef565b820191906000526020600020905b8154815290600101906020018083116109d257829003601f168201915b5050965050505050505060405180910390a161010860008460001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201805460018160011615610100020316600290046000825580601f10610a735750610aaa565b601f016020900490600052602060002090810190610aa991905b80821115610aa5576000816000905550600101610a8d565b5090565b5b50505060019150610ab7565b5b5b5b50919050565b600036604051808383808284378201915050925050506040518091039020610ae68161125b565b15610af55781610105819055505b5b5b5050565b6000610b0533610553565b15610e5f57610b13846116c9565b15610bfc577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd0043385878686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a18473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876185025a03f1925050505060006001029050610e5e565b60003643604051808484808284378201915050828152602001935050505060405180910390209050610c2d81610713565b158015610c8b5750600061010860008360001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610e5d578461010860008360001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690836c01000000000000000000000000908102040217905550836101086000836000191681526020019081526020016000206001018190555082826101086000846000191681526020019081526020016000206002019190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610d6657803560ff1916838001178555610d94565b82800160010185558215610d94579182015b82811115610d93578235825591602001919060010190610d78565b5b509050610db991905b80821115610db5576000816000905550600101610d9d565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3281338688878760405180876000191681526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b5b949350505050565b60006000600061010260003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506000831415610ea957610f59565b8260020a915061010360008560001916815260200190815260200160002090506000828260010154161115610f585780600001600081548092919060010191905055508181600101600082825403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff168152602001826000191681526020019250505060405180910390a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610f868161125b565b15610fe257600154821115610f9a57610fe1565b81600081905550610fa961147f565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b5b5b5050565b6000600060006000610103600087600019168152602001908152602001600020925061010260008673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205491506000821415611048576000935061105c565b8160020a9050600081846001015416141593505b50505092915050565b6000600260018301610100811015610000570160005b505490505b919050565b6000366040518083838082843782019150509250505060405180910390206110ac8161125b565b156110cb578173ffffffffffffffffffffffffffffffffffffffff16ff5b5b5b5050565b60006000366040518083838082843782019150509250505060405180910390206110f98161125b565b1561124d5761110783610553565b156111115761124c565b61010260008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150600082141561114c5761124c565b61115461147f565b8273ffffffffffffffffffffffffffffffffffffffff16600283610100811015610000570160005b5081905550600061010260008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508161010260008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5b5b50505050565b6101055481565b600060006000600061010260003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549250600083141561129e57611477565b61010360008660001916815260200190815260200160002091506000826000015414156113555760005482600001819055506000826001018190555061010480548091906001018154818355818115116113245781836000526020600020918201910161132391905b8082111561131f576000816000905550600101611307565b5090565b5b5050508260020181905550846101048360020154815481101561000057906000526020600020900160005b50819055505b8260020a90506000818360010154161415611476577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff168152602001826000191681526020019250505060405180910390a16001826000015411151561144d5761010461010360008760001916815260200190815260200160002060020154815481101561000057906000526020600020900160005b5060009055610103600086600019168152602001908152602001600020600060008201600090556001820160009055600282016000905550506001935061147756611475565b8160000160008154809291906001900391905055508082600101600082825417925050819055505b5b5b505050919050565b60006000610104805490509150600090505b8181101561156d57610108600061010483815481101561000057906000526020600020900160005b505460001916815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000905560028201805460018160011615610100020316600290046000825580601f10611527575061155e565b601f01602090049060005260206000209081019061155d91905b80821115611559576000816000905550600101611541565b5090565b5b5050505b806001019050611491565b61157561174f565b5b5050565b6000600190505b6001548110156116c5575b600154811080156115b057506000600282610100811015610000570160005b505414155b156115c257808060010191505061158c565b5b60016001541180156115e9575060006002600154610100811015610000570160005b5054145b1561160657600160008154809291906001900391905055506115c3565b6001548110801561162c575060006002600154610100811015610000570160005b505414155b801561164a57506000600282610100811015610000570160005b5054145b156116c0576002600154610100811015610000570160005b5054600282610100811015610000570160005b5081905550806101026000600284610100811015610000570160005b505481526020019081526020016000208190555060006002600154610100811015610000570160005b50819055505b611581565b5b50565b60006116d433610553565b1561174957610107546116e5611832565b1115611704576000610106819055506116fc611832565b610107819055505b610106548261010654011015801561172457506101055482610106540111155b1561174357816101066000828254019250508190555060019050611748565b600090505b5b5b919050565b60006000610104805490509150600090505b818110156117f357600060010261010482815481101561000057906000526020600020900160005b5054600019161415156117e757610103600061010483815481101561000057906000526020600020900160005b5054600019168152602001908152602001600020600060008201600090556001820160009055600282016000905550505b5b806001019050611761565b6101048054600082559060005260206000209081019061182b91905b8082111561182757600081600090555060010161180f565b5090565b5b505b5050565b600062015180428115610000570490505b9056';
+export default '0x606060405234610000576040516113bb3803806113bb83398101604090815281516020830151918301519201915b805b83835b815160019081019055600033600160a060020a03166003825b505550600160a060020a033316600090815261010260205260408120600190555b82518110156100ee57828181518110156100005790602001906020020151600160a060020a0316600282600201610100811015610000570160005b5081905550806002016101026000858481518110156100005790602001906020020151600160a060020a03168152602001908152602001600020819055505b60010161006c565b60008290555b50505061010581905561011264010000000061127861012182021704565b610107555b505b50505061012b565b6201518042045b90565b611282806101396000396000f3606060405236156100da5760e060020a6000350463173825d981146101305780632f54bf6e146101425780634123cb6b1461016657806352375093146101855780635c52c2f5146101a4578063659010e7146101b35780637065cb48146101d2578063746c9171146101e4578063797af62714610203578063b20d30a914610227578063b61d27f614610239578063b75c7dc61461026b578063ba51a6df1461027d578063c2cf73261461028f578063c41a360a146102b6578063cbf0b0c0146102e2578063f00d4b5d146102f4578063f1736d8614610309575b61012e5b600034111561012b5760408051600160a060020a033316815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b5b565b005b346100005761012e600435610328565b005b3461000057610152600435610415565b604080519115158252519081900360200190f35b3461000057610173610436565b60408051918252519081900360200190f35b346100005761017361043c565b60408051918252519081900360200190f35b346100005761012e610443565b005b346100005761017361047b565b60408051918252519081900360200190f35b346100005761012e600435610482565b005b3461000057610173610571565b60408051918252519081900360200190f35b3461000057610152600435610577565b604080519115158252519081900360200190f35b346100005761012e6004356107e3565b005b34610000576101736004803590602480359160443591820191013561081c565b60408051918252519081900360200190f35b346100005761012e600435610ab3565b005b346100005761012e600435610b5e565b005b3461000057610152600435602435610be0565b604080519115158252519081900360200190f35b34610000576102c6600435610c35565b60408051600160a060020a039092168252519081900360200190f35b346100005761012e600435610c55565b005b346100005761012e600435602435610c93565b005b3461000057610173610d8c565b60408051918252519081900360200190f35b600060003660405180838380828437820191505092505050604051809103902061035181610d93565b1561040e57600160a060020a03831660009081526101026020526040902054915081151561037e5761040e565b60016001540360005411156103925761040e565b6000600283610100811015610000570160005b5055600160a060020a038316600090815261010260205260408120556103c9610f32565b6103d1611002565b60408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b5b5b505050565b600160a060020a03811660009081526101026020526040812054115b919050565b60015481565b6101075481565b60003660405180838380828437820191505092505050604051809103902061046a81610d93565b15610476576000610106555b5b5b50565b6101065481565b6000366040518083838082843782019150509250505060405180910390206104a981610d93565b1561056b576104b782610415565b156104c15761056b565b6104c9610f32565b60015460fa90106104dc576104dc611002565b5b60015460fa90106104ed5761056b565b60018054810190819055600160a060020a03831690600290610100811015610000570160005b5055600154600160a060020a03831660008181526101026020908152604091829020939093558051918252517f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3929181900390910190a15b5b5b5050565b60005481565b60008161058381610d93565b156107da5760008381526101086020526040902054600160a060020a0316156107da5760008381526101086020526040908190208054600180830154935160029384018054600160a060020a0390941695949093919283928592918116156101000260001901160480156106385780601f1061060d57610100808354040283529160200191610638565b820191906000526020600020905b81548152906001019060200180831161061b57829003601f168201915b505091505060006040518083038185876185025a03f15050506000848152610108602090815260409182902060018082015482548551600160a060020a033381811683529682018c905296810183905295166060860181905260a06080870181815260029586018054958616156101000260001901909516959095049087018190527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a95929491939290919060c08301908490801561073d5780601f106107125761010080835404028352916020019161073d565b820191906000526020600020905b81548152906001019060200180831161072057829003601f168201915b5050965050505050505060405180910390a16000838152610108602052604081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f81901061079f57506107d1565b601f0160209004906000526020600020908101906107d191905b808211156107cd57600081556001016107b9565b5090565b5b505050600191505b5b5b5b50919050565b60003660405180838380828437820191505092505050604051809103902061080a81610d93565b1561056b576101058290555b5b5b5050565b600061082733610415565b15610aa85761083584611131565b156108f3577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00433858786866040518086600160a060020a0316815260200185815260200184600160a060020a0316815260200180602001828103825284848281815260200192508082843760405192018290039850909650505050505050a184600160a060020a03168484846040518083838082843782019150509250505060006040518083038185876185025a03f15060009350610aa892505050565b6000364360405180848480828437820191505082815260200193505050506040518091039020905061092481610577565b158015610947575060008181526101086020526040902054600160a060020a0316155b15610aa857600081815261010860209081526040822080546c01000000000000000000000000808a0204600160a060020a0319909116178155600180820188905560029182018054818652948490209094601f928116156101000260001901169290920481019290920481019185919087908390106109d15782800160ff198235161785556109fe565b828001600101855582156109fe579182015b828111156109fe5782358255916020019190600101906109e3565b5b50610a1f9291505b808211156107cd57600081556001016107b9565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808760001916815260200186600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284376040519201829003995090975050505050505050a15b5b5b5b949350505050565b600160a060020a033316600090815261010260205260408120549080821515610adb57610b57565b50506000828152610103602052604081206001810154600284900a929083161115610b575780546001908101825581018054839003905560408051600160a060020a03331681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b5b50505050565b600036604051808383808284378201915050925050506040518091039020610b8581610d93565b1561056b57600154821115610b995761056b565b6000829055610ba6610f32565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15b5b5b5050565b600082815261010360209081526040808320600160a060020a038516845261010290925282205482811515610c185760009350610c2c565b8160020a9050808360010154166000141593505b50505092915050565b6000600282600101610100811015610000570160005b505490505b919050565b600036604051808383808284378201915050925050506040518091039020610c7c81610d93565b1561056b5781600160a060020a0316ff5b5b5b5050565b6000600036604051808383808284378201915050925050506040518091039020610cbc81610d93565b15610b5757610cca83610415565b15610cd457610b57565b600160a060020a038416600090815261010260205260409020549150811515610cfc57610b57565b610d04610f32565b82600160a060020a0316600283610100811015610000570160005b5055600160a060020a0380851660008181526101026020908152604080832083905593871680835291849020869055835192835282015281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a15b5b5b50505050565b6101055481565b600160a060020a033316600090815261010260205260408120548180821515610dbb57610f28565b60008581526101036020526040902080549092501515610e4f576000805483556001808401919091556101048054918201808255828015829011610e2457600083815260209020610e249181019083015b808211156107cd57600081556001016107b9565b5090565b5b50505060028301819055610104805487929081101561000057906000526020600020900160005b50555b8260020a90508082600101541660001415610f285760408051600160a060020a03331681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610f155760008581526101036020526040902060020154610104805490919081101561000057906000526020600020900160005b506000908190558581526101036020526040812081815560018082018390556002909101919091559350610f2856610f28565b8154600019018255600182018054821790555b5b5b505050919050565b6101045460005b81811015610ff557610108600061010483815481101561000057906000526020600020900160005b50548152602081019190915260400160009081208054600160a060020a0319168155600180820183905560028083018054858255939493909281161561010002600019011604601f819010610fb65750610fe8565b601f016020900490600052602060002090810190610fe891905b808211156107cd57600081556001016107b9565b5090565b5b5050505b600101610f39565b61056b6111a4565b5b5050565b60015b600154811015610476575b600154811080156110325750600281610100811015610000570160005b505415155b1561103f57600101611010565b5b600160015411801561106457506002600154610100811015610000570160005b5054155b156110785760018054600019019055611040565b6001548110801561109c57506002600154610100811015610000570160005b505415155b80156110b85750600281610100811015610000570160005b5054155b15611128576002600154610100811015610000570160005b5054600282610100811015610000570160005b5055806101026000600283610100811015610000570160005b505481526020019081526020016000208190555060006002600154610100811015610000570160005b50555b611005565b5b50565b600061113c33610415565b15610431576101075461114d611278565b111561116657600061010655611161611278565b610107555b610106548281011080159061118357506101055482610106540111155b1561119957506101068054820190556001610431565b5060005b5b5b919050565b6101045460005b818110156112215761010481815481101561000057906000526020600020900160005b50541561121857610103600061010483815481101561000057906000526020600020900160005b505481526020810191909152604001600090812081815560018101829055600201555b5b6001016111ab565b610104805460008083559190915261040e907f4c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe908101905b808211156107cd57600081556001016107b9565b5090565b5b505b5050565b6201518042045b9056';
diff --git a/js/src/dapps/basiccoin/Application/application.js b/js/src/dapps/basiccoin/Application/application.js
index abe0c90c5..a05ab6436 100644
--- a/js/src/dapps/basiccoin/Application/application.js
+++ b/js/src/dapps/basiccoin/Application/application.js
@@ -94,7 +94,6 @@ export default class Application extends Component {
tokenregInstance,
accounts: Object
.keys(accountsInfo)
- .filter((address) => !accountsInfo[address].meta.deleted)
.sort((a, b) => {
return (accountsInfo[b].uuid || '').localeCompare(accountsInfo[a].uuid || '');
})
diff --git a/js/src/dapps/registry/addresses/actions.js b/js/src/dapps/registry/addresses/actions.js
index 666196e88..059366173 100644
--- a/js/src/dapps/registry/addresses/actions.js
+++ b/js/src/dapps/registry/addresses/actions.js
@@ -24,7 +24,6 @@ export const fetch = () => (dispatch) => {
.then((accountsInfo) => {
const addresses = Object
.keys(accountsInfo)
- .filter((address) => accountsInfo[address] && !accountsInfo[address].meta.deleted)
.map((address) => ({
...accountsInfo[address],
address,
diff --git a/js/src/jsonrpc/interfaces/parity.js b/js/src/jsonrpc/interfaces/parity.js
index 02155890e..067ced1fc 100644
--- a/js/src/jsonrpc/interfaces/parity.js
+++ b/js/src/jsonrpc/interfaces/parity.js
@@ -256,6 +256,20 @@ export default {
}
},
+ removeAddress: {
+ desc: 'Removes an address from the addressbook',
+ params: [
+ {
+ type: Address,
+ desc: 'The address to remove'
+ }
+ ],
+ returns: {
+ type: Boolean,
+ desc: 'true on success'
+ }
+ },
+
listGethAccounts: {
desc: 'Returns a list of the accounts available from Geth',
params: [],
diff --git a/js/src/modals/AddAddress/addAddress.js b/js/src/modals/AddAddress/addAddress.js
index 9b31d4a42..590287e73 100644
--- a/js/src/modals/AddAddress/addAddress.js
+++ b/js/src/modals/AddAddress/addAddress.js
@@ -102,7 +102,7 @@ export default class AddAddress extends Component {
if (!addressError) {
const contact = contacts[address];
- if (contact && !contact.meta.deleted) {
+ if (contact) {
addressError = ERRORS.duplicateAddress;
}
}
diff --git a/js/src/modals/AddContract/addContract.js b/js/src/modals/AddContract/addContract.js
index 70a1fd7dc..71f8a911d 100644
--- a/js/src/modals/AddContract/addContract.js
+++ b/js/src/modals/AddContract/addContract.js
@@ -231,7 +231,7 @@ export default class AddContract extends Component {
if (!addressError) {
const contract = contracts[address];
- if (contract && !contract.meta.deleted) {
+ if (contract) {
addressError = ERRORS.duplicateAddress;
}
}
diff --git a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js
index 5d581b81d..314425dcf 100644
--- a/js/src/modals/CreateWallet/WalletDetails/walletDetails.js
+++ b/js/src/modals/CreateWallet/WalletDetails/walletDetails.js
@@ -117,15 +117,17 @@ export default class WalletDetails extends Component {
onChange={ this.onRequiredChange }
param={ parseAbiType('uint') }
min={ 1 }
+ max={ wallet.owners.length + 1 }
/>
diff --git a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js
index 344f4e09a..bbbe5877f 100644
--- a/js/src/modals/CreateWallet/WalletInfo/walletInfo.js
+++ b/js/src/modals/CreateWallet/WalletInfo/walletInfo.js
@@ -17,6 +17,7 @@
import React, { Component, PropTypes } from 'react';
import { CompletedStep, IdentityIcon, CopyToClipboard } from '~/ui';
+import { fromWei } from '~/api/util/wei';
import styles from '../createWallet.css';
@@ -62,7 +63,7 @@ export default class WalletInfo extends Component {
{ required }
owners are required to confirm a transaction.
- The daily limit is set to { daylimit }
.
+ The daily limit is set to { fromWei(daylimit).toFormat() }
ETH.
);
diff --git a/js/src/modals/CreateWallet/WalletType/walletType.js b/js/src/modals/CreateWallet/WalletType/walletType.js
index e77d58fc6..868c6ad9b 100644
--- a/js/src/modals/CreateWallet/WalletType/walletType.js
+++ b/js/src/modals/CreateWallet/WalletType/walletType.js
@@ -43,7 +43,13 @@ export default class WalletType extends Component {
return [
{
label: 'Multi-Sig wallet', key: 'MULTISIG',
- description: 'A standard multi-signature Wallet'
+ description: (
+
+ Create/Deploy a
+ standard multi-signature
+ Wallet
+
+ )
},
{
label: 'Watch a wallet', key: 'WATCH',
diff --git a/js/src/modals/CreateWallet/createWalletStore.js b/js/src/modals/CreateWallet/createWalletStore.js
index f5e2f1855..d8c308a12 100644
--- a/js/src/modals/CreateWallet/createWalletStore.js
+++ b/js/src/modals/CreateWallet/createWalletStore.js
@@ -16,7 +16,7 @@
import { observable, computed, action, transaction } from 'mobx';
-import { validateUint, validateAddress, validateName } from '../../util/validation';
+import { validateUint, validateAddress, validateName } from '~/util/validation';
import { ERROR_CODES } from '~/api/transport/error';
import Contract from '~/api/contract';
diff --git a/js/src/modals/Transfer/store.js b/js/src/modals/Transfer/store.js
index a0c7967b9..8f8baf55f 100644
--- a/js/src/modals/Transfer/store.js
+++ b/js/src/modals/Transfer/store.js
@@ -23,7 +23,7 @@ import { bytesToHex } from '~/api/util/format';
import Contract from '~/api/contract';
import ERRORS from './errors';
import { ERROR_CODES } from '~/api/transport/error';
-import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '../../util/constants';
+import { DEFAULT_GAS, DEFAULT_GASPRICE, MAX_GAS_ESTIMATION } from '~/util/constants';
const TITLES = {
transfer: 'transfer details',
@@ -116,7 +116,6 @@ export default class TransferStore {
this.api = api;
const { account, balance, gasLimit, senders, onClose, newError, sendersBalances } = props;
-
this.account = account;
this.balance = balance;
this.gasLimit = gasLimit;
@@ -412,34 +411,38 @@ export default class TransferStore {
return;
}
- const { gas, gasPrice, tag, valueAll, isEth } = this;
+ const { gas, gasPrice, tag, valueAll, isEth, isWallet } = this;
const gasTotal = new BigNumber(gasPrice || 0).mul(new BigNumber(gas || 0));
const availableEth = new BigNumber(balance.tokens[0].value);
const senderBalance = this.balance.tokens.find((b) => tag === b.token.tag);
- const available = new BigNumber(senderBalance.value);
const format = new BigNumber(senderBalance.token.format || 1);
+ const available = isWallet
+ ? this.api.util.fromWei(new BigNumber(senderBalance.value))
+ : (new BigNumber(senderBalance.value)).div(format);
let { value, valueError } = this;
let totalEth = gasTotal;
let totalError = null;
if (valueAll) {
- if (isEth) {
+ if (isEth && !isWallet) {
const bn = this.api.util.fromWei(availableEth.minus(gasTotal));
value = (bn.lt(0) ? new BigNumber(0.0) : bn).toString();
+ } else if (isEth) {
+ value = (available.lt(0) ? new BigNumber(0.0) : available).toString();
} else {
- value = available.div(format).toString();
+ value = available.toString();
}
}
- if (isEth) {
+ if (isEth && !isWallet) {
totalEth = totalEth.plus(this.api.util.toWei(value || 0));
}
- if (new BigNumber(value || 0).gt(available.div(format))) {
+ if (new BigNumber(value || 0).gt(available)) {
valueError = ERRORS.largeAmount;
} else if (valueError === ERRORS.largeAmount) {
valueError = null;
diff --git a/js/src/modals/Transfer/transfer.js b/js/src/modals/Transfer/transfer.js
index 402e3ae4f..e1e2a0951 100644
--- a/js/src/modals/Transfer/transfer.js
+++ b/js/src/modals/Transfer/transfer.js
@@ -139,8 +139,8 @@ class Transfer extends Component {
? (
-
- This transaction needs confirmation from other owners.
+
+
This transaction needs confirmation from other owners.
-
+
)
: null
@@ -298,7 +298,6 @@ function mapStateToProps (initState, initProps) {
return (state) => {
const { gasLimit } = state.nodeStatus;
const sendersBalances = senders ? pick(state.balances.balances, Object.keys(senders)) : null;
-
return { gasLimit, wallet, senders, sendersBalances };
};
}
diff --git a/js/src/modals/WalletSettings/index.js b/js/src/modals/WalletSettings/index.js
new file mode 100644
index 000000000..9b15a5f3b
--- /dev/null
+++ b/js/src/modals/WalletSettings/index.js
@@ -0,0 +1,17 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+export default from './walletSettings';
diff --git a/js/src/modals/WalletSettings/walletSettings.css b/js/src/modals/WalletSettings/walletSettings.css
new file mode 100644
index 000000000..ae52013cd
--- /dev/null
+++ b/js/src/modals/WalletSettings/walletSettings.css
@@ -0,0 +1,63 @@
+/* Copyright 2015, 2016 Ethcore (UK) Ltd.
+/* This file is part of Parity.
+/*
+/* Parity is free software: you can redistribute it and/or modify
+/* it under the terms of the GNU General Public License as published by
+/* the Free Software Foundation, either version 3 of the License, or
+/* (at your option) any later version.
+/*
+/* Parity is distributed in the hope that it will be useful,
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+/* GNU General Public License for more details.
+/*
+/* You should have received a copy of the GNU General Public License
+/* along with Parity. If not, see .
+*/
+
+.splitInput {
+ display: flex;
+ flex-direction: row;
+
+ > * {
+ flex: 1;
+
+ margin: 0 0.25em;
+
+ &:first-child {
+ margin-left: 0;
+ }
+
+ &:last-child {
+ margin-right: 0;
+ }
+ }
+}
+
+.change {
+ background-color: rgba(255, 255, 255, 0.1);
+ padding: 0.75em 1.75em;
+ margin-bottom: 1em;
+
+ &.add {
+ background-color: rgba(139, 195, 74, 0.5);
+ }
+
+ &.remove {
+ background-color: rgba(244, 67, 54, 0.5);
+ }
+
+ .label {
+ text-transform: uppercase;
+ margin-bottom: 0.5em;
+ margin-left: -1em;
+ font-size: 0.8em;
+ }
+}
+
+.eth:after {
+ content: 'ETH';
+ font-size: 0.75em;
+ margin-left: 0.125em;
+}
+
diff --git a/js/src/modals/WalletSettings/walletSettings.js b/js/src/modals/WalletSettings/walletSettings.js
new file mode 100644
index 000000000..1b2b2cc1a
--- /dev/null
+++ b/js/src/modals/WalletSettings/walletSettings.js
@@ -0,0 +1,321 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import React, { Component, PropTypes } from 'react';
+import { connect } from 'react-redux';
+import { observer } from 'mobx-react';
+import { pick } from 'lodash';
+
+import ActionDone from 'material-ui/svg-icons/action/done';
+import ContentClear from 'material-ui/svg-icons/content/clear';
+import NavigationArrowForward from 'material-ui/svg-icons/navigation/arrow-forward';
+import { parseAbiType } from '~/util/abi';
+
+import { Button, Modal, TxHash, BusyStep, Form, TypedInput, InputAddress, AddressSelect } from '~/ui';
+import { fromWei } from '~/api/util/wei';
+
+import WalletSettingsStore from './walletSettingsStore.js';
+import styles from './walletSettings.css';
+
+@observer
+class WalletSettings extends Component {
+ static contextTypes = {
+ api: PropTypes.object.isRequired
+ };
+
+ static propTypes = {
+ accounts: PropTypes.object.isRequired,
+ wallet: PropTypes.object.isRequired,
+ onClose: PropTypes.func.isRequired,
+ senders: PropTypes.object.isRequired
+ };
+
+ store = new WalletSettingsStore(this.context.api, this.props.wallet);
+
+ render () {
+ const { stage, steps, waiting, rejected } = this.store;
+
+ if (rejected) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+ s.title) }
+ waiting={ waiting }
+ >
+ { this.renderPage() }
+
+ );
+ }
+
+ renderPage () {
+ const { step } = this.store;
+
+ switch (step) {
+ case 'SENDING':
+ return (
+
+ {
+ this.store.requests.map((req) => {
+ const key = req.id;
+
+ if (req.txhash) {
+ return ( );
+ }
+
+ if (req.rejected) {
+ return (The transaction #{parseInt(key, 16)} has been rejected
);
+ }
+ })
+ }
+
+ );
+
+ case 'CONFIRMATION':
+ const { changes } = this.store;
+
+ return (
+
+
You are about to make the following modifications
+
+ { this.renderChanges(changes) }
+
+
+ );
+
+ default:
+ case 'EDIT':
+ const { wallet, errors } = this.store;
+ const { accounts, senders } = this.props;
+
+ return (
+
+ );
+ }
+ }
+
+ renderChanges (changes) {
+ return changes.map((change, index) => (
+
+ { this.renderChange(change) }
+
+ ));
+ }
+
+ renderChange (change) {
+ const { accounts } = this.props;
+
+ switch (change.type) {
+ case 'dailylimit':
+ return (
+
+
Change Daily Limit
+
+ from
+ { fromWei(change.initial).toFormat() }
+
+ to
+ { fromWei(change.value).toFormat() }
+
+
+
+ );
+
+ case 'require':
+ return (
+
+
Change Required Owners
+
+ from
+ { change.initial.toNumber() }
+ to
+ { change.value.toNumber() }
+
+
+ );
+
+ case 'add_owner':
+ return (
+
+ );
+
+ case 'remove_owner':
+ return (
+
+ );
+ }
+ }
+
+ renderDialogActions () {
+ const { onClose } = this.props;
+ const { step, hasErrors, rejected, onNext, send, done } = this.store;
+
+ const cancelBtn = (
+ }
+ label='Cancel'
+ onClick={ onClose }
+ />
+ );
+
+ const closeBtn = (
+ }
+ label='Close'
+ onClick={ onClose }
+ />
+ );
+
+ const sendingBtn = (
+ }
+ label='Sending...'
+ disabled
+ />
+ );
+
+ const nextBtn = (
+ }
+ label='Next'
+ onClick={ onNext }
+ disabled={ hasErrors }
+ />
+ );
+
+ const sendBtn = (
+ }
+ label='Send'
+ onClick={ send }
+ disabled={ hasErrors }
+ />
+ );
+
+ if (rejected) {
+ return [ closeBtn ];
+ }
+
+ switch (step) {
+ case 'SENDING':
+ return done ? [ closeBtn ] : [ closeBtn, sendingBtn ];
+
+ case 'CONFIRMATION':
+ return [ cancelBtn, sendBtn ];
+
+ default:
+ case 'TYPE':
+ return [ cancelBtn, nextBtn ];
+
+ }
+ }
+}
+
+function mapStateToProps (initState, initProps) {
+ const { accountsInfo, accounts } = initState.personal;
+ const { owners } = initProps.wallet;
+
+ const senders = pick(accounts, owners);
+
+ return () => {
+ return { accounts: accountsInfo, senders };
+ };
+}
+
+export default connect(mapStateToProps)(WalletSettings);
diff --git a/js/src/modals/WalletSettings/walletSettingsStore.js b/js/src/modals/WalletSettings/walletSettingsStore.js
new file mode 100644
index 000000000..f4d5d2275
--- /dev/null
+++ b/js/src/modals/WalletSettings/walletSettingsStore.js
@@ -0,0 +1,306 @@
+// Copyright 2015, 2016 Ethcore (UK) Ltd.
+// This file is part of Parity.
+
+// Parity is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Parity is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Parity. If not, see .
+
+import { observable, computed, action, transaction } from 'mobx';
+import BigNumber from 'bignumber.js';
+
+import { validateUint, validateAddress } from '~/util/validation';
+import { DEFAULT_GAS, MAX_GAS_ESTIMATION } from '~/util/constants';
+import { ERROR_CODES } from '~/api/transport/error';
+
+const STEPS = {
+ EDIT: { title: 'wallet settings' },
+ CONFIRMATION: { title: 'confirmation' },
+ SENDING: { title: 'sending transaction', waiting: true }
+};
+
+export default class WalletSettingsStore {
+ @observable step = null;
+ @observable requests = [];
+ @observable deployState = '';
+ @observable done = false;
+
+ @observable wallet = {
+ owners: null,
+ require: null,
+ dailylimit: null,
+ sender: ''
+ };
+
+ @observable errors = {
+ owners: null,
+ require: null,
+ dailylimit: null,
+ sender: null
+ };
+
+ @computed get stage () {
+ return this.stepsKeys.findIndex((k) => k === this.step);
+ }
+
+ @computed get hasErrors () {
+ return !!Object.keys(this.errors).find((key) => !!this.errors[key]);
+ }
+
+ @computed get stepsKeys () {
+ return this.steps.map((s) => s.key);
+ }
+
+ @computed get steps () {
+ return Object
+ .keys(STEPS)
+ .map((key) => {
+ return {
+ ...STEPS[key],
+ key
+ };
+ });
+ }
+
+ @computed get waiting () {
+ this.steps
+ .map((s, idx) => ({ idx, waiting: s.waiting }))
+ .filter((s) => s.waiting)
+ .map((s) => s.idx);
+ }
+
+ get changes () {
+ const changes = [];
+
+ const prevDailylimit = new BigNumber(this.initialWallet.dailylimit);
+ const nextDailylimit = new BigNumber(this.wallet.dailylimit);
+
+ const prevRequire = new BigNumber(this.initialWallet.require);
+ const nextRequire = new BigNumber(this.wallet.require);
+
+ if (!prevDailylimit.equals(nextDailylimit)) {
+ changes.push({
+ type: 'dailylimit',
+ initial: prevDailylimit,
+ value: nextDailylimit
+ });
+ }
+
+ if (!prevRequire.equals(nextRequire)) {
+ changes.push({
+ type: 'require',
+ initial: prevRequire,
+ value: nextRequire
+ });
+ }
+
+ const prevOwners = this.initialWallet.owners;
+ const nextOwners = this.wallet.owners;
+
+ const ownersToRemove = prevOwners.filter((owner) => !nextOwners.includes(owner));
+ const ownersToAdd = nextOwners.filter((owner) => !prevOwners.includes(owner));
+
+ ownersToRemove.forEach((owner) => {
+ changes.push({
+ type: 'remove_owner',
+ value: owner
+ });
+ });
+
+ ownersToAdd.forEach((owner) => {
+ changes.push({
+ type: 'add_owner',
+ value: owner
+ });
+ });
+
+ return changes;
+ }
+
+ constructor (api, wallet) {
+ this.api = api;
+ this.step = this.stepsKeys[0];
+
+ this.walletInstance = wallet.instance;
+
+ this.initialWallet = {
+ address: wallet.address,
+ owners: wallet.owners,
+ require: wallet.require,
+ dailylimit: wallet.dailylimit.limit
+ };
+
+ transaction(() => {
+ this.wallet.owners = wallet.owners;
+ this.wallet.require = wallet.require;
+ this.wallet.dailylimit = wallet.dailylimit.limit;
+
+ this.validateWallet(this.wallet);
+ });
+ }
+
+ @action onNext = () => {
+ const stepIndex = this.stepsKeys.findIndex((k) => k === this.step) + 1;
+ this.step = this.stepsKeys[stepIndex];
+ }
+
+ @action onChange = (_wallet) => {
+ const newWallet = Object.assign({}, this.wallet, _wallet);
+ this.validateWallet(newWallet);
+ }
+
+ @action onOwnersChange = (owners) => {
+ this.onChange({ owners });
+ }
+
+ @action onRequireChange = (require) => {
+ this.onChange({ require });
+ }
+
+ @action onSenderChange = (_, sender) => {
+ this.onChange({ sender });
+ }
+
+ @action onDailylimitChange = (dailylimit) => {
+ this.onChange({ dailylimit });
+ }
+
+ @action send = () => {
+ const changes = this.changes;
+ const walletInstance = this.walletInstance;
+ this.step = 'SENDING';
+
+ this.onTransactionsState('postTransaction');
+ Promise
+ .all(changes.map((change) => this.sendChange(change, walletInstance)))
+ .then((requestIds) => {
+ this.onTransactionsState('checkRequest');
+ this.requests = requestIds.map((id) => ({ id, rejected: false, txhash: null }));
+
+ return Promise
+ .all(requestIds.map((id) => {
+ return this.api
+ .pollMethod('parity_checkRequest', id)
+ .then((txhash) => {
+ const index = this.requests.findIndex((r) => r.id === id);
+ this.requests[index].txhash = txhash;
+ })
+ .catch((e) => {
+ if (e.code === ERROR_CODES.REQUEST_REJECTED) {
+ const index = this.requests.findIndex((r) => r.id === id);
+ this.requests[index].rejected = true;
+ return false;
+ }
+
+ throw e;
+ });
+ }));
+ })
+ .then(() => {
+ this.done = true;
+ this.onTransactionsState('completed');
+ });
+ }
+
+ @action sendChange = (change, walletInstance) => {
+ const { method, values } = this.getChangeMethod(change, walletInstance);
+
+ const options = {
+ from: this.wallet.sender,
+ to: this.initialWallet.address,
+ gas: MAX_GAS_ESTIMATION
+ };
+
+ return method
+ .estimateGas(options, values)
+ .then((gasEst) => {
+ let gas = gasEst;
+
+ if (gas.gt(DEFAULT_GAS)) {
+ gas = gas.mul(1.2);
+ }
+ options.gas = gas;
+
+ return method.postTransaction(options, values);
+ });
+ }
+
+ getChangeMethod = (change, walletInstance) => {
+ if (change.type === 'require') {
+ return {
+ method: walletInstance.changeRequirement,
+ values: [ change.value ]
+ };
+ }
+
+ if (change.type === 'dailylimit') {
+ return {
+ method: walletInstance.setDailyLimit,
+ values: [ change.value ]
+ };
+ }
+
+ if (change.type === 'add_owner') {
+ return {
+ method: walletInstance.addOwner,
+ values: [ change.value ]
+ };
+ }
+
+ if (change.type === 'remove_owner') {
+ return {
+ method: walletInstance.removeOwner,
+ values: [ change.value ]
+ };
+ }
+ }
+
+ @action onTransactionsState = (state) => {
+ switch (state) {
+ case 'estimateGas':
+ case 'postTransaction':
+ this.deployState = 'Preparing transaction for network transmission';
+ return;
+
+ case 'checkRequest':
+ this.deployState = 'Waiting for confirmation of the transaction in the Parity Secure Signer';
+ return;
+
+ case 'completed':
+ this.deployState = '';
+ return;
+ }
+ }
+
+ @action validateWallet = (_wallet) => {
+ const senderValidation = validateAddress(_wallet.sender);
+ const requireValidation = validateUint(_wallet.require);
+ const dailylimitValidation = validateUint(_wallet.dailylimit);
+
+ const errors = {
+ sender: senderValidation.addressError,
+ require: requireValidation.valueError,
+ dailylimit: dailylimitValidation.valueError
+ };
+
+ const wallet = {
+ ..._wallet,
+ sender: senderValidation.address,
+ require: requireValidation.value,
+ dailylimit: dailylimitValidation.value
+ };
+
+ transaction(() => {
+ this.wallet = wallet;
+ this.errors = errors;
+ });
+ }
+}
diff --git a/js/src/modals/index.js b/js/src/modals/index.js
index 895ca40e8..0f0844e40 100644
--- a/js/src/modals/index.js
+++ b/js/src/modals/index.js
@@ -29,6 +29,7 @@ import Transfer from './Transfer';
import PasswordManager from './PasswordManager';
import SaveContract from './SaveContract';
import LoadContract from './LoadContract';
+import WalletSettings from './WalletSettings';
export {
AddAddress,
@@ -45,5 +46,6 @@ export {
Transfer,
PasswordManager,
LoadContract,
- SaveContract
+ SaveContract,
+ WalletSettings
};
diff --git a/js/src/redux/providers/personal.js b/js/src/redux/providers/personal.js
index fd67ab5f7..e061051b0 100644
--- a/js/src/redux/providers/personal.js
+++ b/js/src/redux/providers/personal.js
@@ -23,6 +23,7 @@ export default class Personal {
}
start () {
+ this._removeDeleted();
this._subscribeAccountsInfo();
}
@@ -40,4 +41,29 @@ export default class Personal {
console.log('personal._subscribeAccountsInfo', 'subscriptionId', subscriptionId);
});
}
+
+ _removeDeleted () {
+ this._api.parity
+ .accountsInfo()
+ .then((accountsInfo) => {
+ return Promise.all(
+ Object
+ .keys(accountsInfo)
+ .filter((address) => {
+ const account = accountsInfo[address];
+
+ return !account.uuid && account.meta.deleted;
+ })
+ .map((address) => this._api.parity.removeAddress(address))
+ );
+ })
+ .then((results) => {
+ if (results.length) {
+ console.log(`Removed ${results.length} previously marked addresses`);
+ }
+ })
+ .catch((error) => {
+ console.warn('removeDeleted', error);
+ });
+ }
}
diff --git a/js/src/redux/providers/personalActions.js b/js/src/redux/providers/personalActions.js
index a1e9845db..47056af2f 100644
--- a/js/src/redux/providers/personalActions.js
+++ b/js/src/redux/providers/personalActions.js
@@ -27,7 +27,7 @@ export function personalAccountsInfo (accountsInfo) {
Object.keys(accountsInfo || {})
.map((address) => Object.assign({}, accountsInfo[address], { address }))
- .filter((account) => !account.meta.deleted)
+ .filter((account) => account.uuid || !account.meta.deleted)
.forEach((account) => {
if (account.uuid) {
accounts[account.address] = account;
diff --git a/js/src/redux/providers/walletActions.js b/js/src/redux/providers/walletActions.js
index d68803531..10f6a278e 100644
--- a/js/src/redux/providers/walletActions.js
+++ b/js/src/redux/providers/walletActions.js
@@ -228,7 +228,7 @@ function fetchWalletInfo (contract, update, getState) {
const owners = ownersUpdate && ownersUpdate.value || null;
const transactions = transactionsUpdate && transactionsUpdate.value || null;
- return fetchWalletConfirmations(contract, owners, transactions, getState)
+ return fetchWalletConfirmations(contract, update[UPDATE_CONFIRMATIONS], owners, transactions, getState)
.then((update) => {
updates.push(update);
return updates;
@@ -292,77 +292,113 @@ function fetchWalletDailylimit (contract) {
});
}
-function fetchWalletConfirmations (contract, _owners = null, _transactions = null, getState) {
+function fetchWalletConfirmations (contract, _operations, _owners = null, _transactions = null, getState) {
const walletInstance = contract.instance;
const wallet = getState().wallet.wallets[contract.address];
const owners = _owners || (wallet && wallet.owners) || null;
const transactions = _transactions || (wallet && wallet.transactions) || null;
+ // Full load if no operations given, or if the one given aren't loaded yet
+ const fullLoad = !Array.isArray(_operations) || _operations
+ .filter((op) => !wallet.confirmations.find((conf) => conf.operation === op))
+ .length > 0;
- return walletInstance
- .ConfirmationNeeded
- .getAllLogs()
- .then((logs) => {
- return logs.sort((logA, logB) => {
- const comp = logA.blockNumber.comparedTo(logB.blockNumber);
+ let promise;
- if (comp !== 0) {
- return comp;
+ if (fullLoad) {
+ promise = walletInstance
+ .ConfirmationNeeded
+ .getAllLogs()
+ .then((logs) => {
+ return logs.map((log) => ({
+ initiator: log.params.initiator.value,
+ to: log.params.to.value,
+ data: log.params.data.value,
+ value: log.params.value.value,
+ operation: bytesToHex(log.params.operation.value),
+ transactionIndex: log.transactionIndex,
+ transactionHash: log.transactionHash,
+ blockNumber: log.blockNumber,
+ confirmedBy: []
+ }));
+ })
+ .then((logs) => {
+ return logs.sort((logA, logB) => {
+ const comp = logA.blockNumber.comparedTo(logB.blockNumber);
+
+ if (comp !== 0) {
+ return comp;
+ }
+
+ return logA.transactionIndex.comparedTo(logB.transactionIndex);
+ });
+ })
+ .then((confirmations) => {
+ if (confirmations.length === 0) {
+ return confirmations;
}
- return logA.transactionIndex.comparedTo(logB.transactionIndex);
+ // Only fetch confirmations for operations not
+ // yet confirmed (ie. not yet a transaction)
+ if (transactions) {
+ const operations = transactions
+ .filter((t) => t.operation)
+ .map((t) => t.operation);
+
+ return confirmations.filter((confirmation) => {
+ return !operations.includes(confirmation.operation);
+ });
+ }
+
+ return confirmations;
});
- })
- .then((logs) => {
- return logs.map((log) => ({
- initiator: log.params.initiator.value,
- to: log.params.to.value,
- data: log.params.data.value,
- value: log.params.value.value,
- operation: bytesToHex(log.params.operation.value),
- transactionHash: log.transactionHash,
- blockNumber: log.blockNumber,
- confirmedBy: []
- }));
- })
+ } else {
+ const { confirmations } = wallet;
+ const nextConfirmations = confirmations
+ .filter((conf) => _operations.includes(conf.operation));
+
+ promise = Promise.resolve(nextConfirmations);
+ }
+
+ return promise
.then((confirmations) => {
if (confirmations.length === 0) {
return confirmations;
}
- if (transactions) {
- const operations = transactions
- .filter((t) => t.operation)
- .map((t) => t.operation);
+ const uniqConfirmations = Object.values(
+ confirmations.reduce((confirmations, confirmation) => {
+ confirmations[confirmation.operation] = confirmation;
+ return confirmations;
+ }, {})
+ );
- return confirmations.filter((confirmation) => {
- return !operations.includes(confirmation.operation);
- });
- }
+ const operations = uniqConfirmations.map((conf) => conf.operation);
- return confirmations;
- })
- .then((confirmations) => {
- if (confirmations.length === 0) {
- return confirmations;
- }
-
- const operations = confirmations.map((conf) => conf.operation);
return Promise
.all(operations.map((op) => fetchOperationConfirmations(contract, op, owners)))
.then((confirmedBys) => {
- confirmations.forEach((_, index) => {
- confirmations[index].confirmedBy = confirmedBys[index];
+ uniqConfirmations.forEach((_, index) => {
+ uniqConfirmations[index].confirmedBy = confirmedBys[index];
});
- return confirmations;
+ return uniqConfirmations;
});
})
.then((confirmations) => {
+ const prevConfirmations = wallet.confirmations || [];
+ const nextConfirmations = prevConfirmations
+ .filter((conA) => !confirmations.find((conB) => conB.operation === conA.operation))
+ .concat(confirmations)
+ .map((conf) => ({
+ ...conf,
+ pending: false
+ }));
+
return {
key: UPDATE_CONFIRMATIONS,
- value: confirmations
+ value: nextConfirmations
};
});
}
@@ -417,7 +453,10 @@ function parseLogs (logs) {
logs.forEach((log) => {
const { address, topics } = log;
const eventSignature = toHex(topics[0]);
- const prev = updates[address] || { address };
+ const prev = updates[address] || {
+ [ UPDATE_DAILYLIMIT ]: true,
+ address
+ };
switch (eventSignature) {
case signatures.OwnerChanged:
@@ -436,16 +475,18 @@ function parseLogs (logs) {
};
return;
+ case signatures.ConfirmationNeeded:
case signatures.Confirmation:
case signatures.Revoke:
- const operation = log.params.operation.value;
+ const operation = bytesToHex(log.params.operation.value);
updates[address] = {
...prev,
[ UPDATE_CONFIRMATIONS ]: uniq(
- (prev.operations || []).concat(operation)
+ (prev[UPDATE_CONFIRMATIONS] || []).concat(operation)
)
};
+
return;
case signatures.Deposit:
@@ -456,17 +497,6 @@ function parseLogs (logs) {
[ UPDATE_TRANSACTIONS ]: true
};
return;
-
- case signatures.ConfirmationNeeded:
- const op = log.params.operation.value;
-
- updates[address] = {
- ...prev,
- [ UPDATE_CONFIRMATIONS ]: uniq(
- (prev.operations || []).concat(op)
- )
- };
- return;
}
});
diff --git a/js/src/ui/CopyToClipboard/copyToClipboard.css b/js/src/ui/CopyToClipboard/copyToClipboard.css
index 0c511ba45..6cc8d8030 100644
--- a/js/src/ui/CopyToClipboard/copyToClipboard.css
+++ b/js/src/ui/CopyToClipboard/copyToClipboard.css
@@ -20,5 +20,14 @@
}
.data {
+ flex: 1;
font-family: monospace;
+ padding: 0 0.5em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.container {
+ display: flex;
}
diff --git a/js/src/ui/CopyToClipboard/copyToClipboard.js b/js/src/ui/CopyToClipboard/copyToClipboard.js
index 7a654f9ce..b7041658c 100644
--- a/js/src/ui/CopyToClipboard/copyToClipboard.js
+++ b/js/src/ui/CopyToClipboard/copyToClipboard.js
@@ -80,7 +80,13 @@ class CopyToClipboard extends Component {
onCopy = () => {
const { data, onCopy, cooldown, showSnackbar } = this.props;
- const message = (copied { data }
to clipboard
);
+ const message = (
+
+ copied
+ { data }
+ to clipboard
+
+ );
this.setState({
copied: true,
diff --git a/js/src/ui/Form/AddressSelect/addressSelect.js b/js/src/ui/Form/AddressSelect/addressSelect.js
index fbaef2ee6..d0f331c34 100644
--- a/js/src/ui/Form/AddressSelect/addressSelect.js
+++ b/js/src/ui/Form/AddressSelect/addressSelect.js
@@ -170,7 +170,7 @@ export default class AddressSelect extends Component {
handleFilter = (searchText, name, item) => {
const { address } = item;
const entry = this.state.entries[address];
- const lowCaseSearch = searchText.toLowerCase();
+ const lowCaseSearch = (searchText || '').toLowerCase();
return [entry.name, entry.address]
.some(text => text.toLowerCase().indexOf(lowCaseSearch) !== -1);
diff --git a/js/src/ui/Form/InputAddress/inputAddress.js b/js/src/ui/Form/InputAddress/inputAddress.js
index da2c3b8d3..f403cf311 100644
--- a/js/src/ui/Form/InputAddress/inputAddress.js
+++ b/js/src/ui/Form/InputAddress/inputAddress.js
@@ -53,7 +53,6 @@ class InputAddress extends Component {
const { small, allowCopy, hideUnderline, onSubmit, accountsInfo, tokens } = this.props;
const account = accountsInfo[value] || tokens[value];
- const hasAccount = account && !(account.meta && account.meta.deleted);
const icon = this.renderIcon();
@@ -74,7 +73,7 @@ class InputAddress extends Component {
label={ label }
hint={ hint }
error={ error }
- value={ text && hasAccount ? account.name : value }
+ value={ text && account ? account.name : value }
onChange={ this.handleInputChange }
onSubmit={ onSubmit }
allowCopy={ allowCopy && (disabled ? value : false) }
diff --git a/js/src/ui/Form/TypedInput/typedInput.css b/js/src/ui/Form/TypedInput/typedInput.css
index c13206c96..ab911edac 100644
--- a/js/src/ui/Form/TypedInput/typedInput.css
+++ b/js/src/ui/Form/TypedInput/typedInput.css
@@ -29,3 +29,30 @@
position: relative;
}
}
+
+.ethInput {
+ display: flex;
+ flex-direction: row;
+ align-items: flex-end;
+
+ .input {
+ flex: 1;
+ position: relative;
+
+ .label {
+ position: absolute;
+ right: 1.5em;
+ bottom: 1em;
+ font-size: 0.85em;
+ margin-left: 0.5em;
+ }
+ }
+
+ .toggle {
+ margin-bottom: 0.5em;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ }
+}
+
diff --git a/js/src/ui/Form/TypedInput/typedInput.js b/js/src/ui/Form/TypedInput/typedInput.js
index c0b1f5548..9162348e0 100644
--- a/js/src/ui/Form/TypedInput/typedInput.js
+++ b/js/src/ui/Form/TypedInput/typedInput.js
@@ -15,7 +15,7 @@
// along with Parity. If not, see .
import React, { Component, PropTypes } from 'react';
-import { MenuItem } from 'material-ui';
+import { MenuItem, Toggle } from 'material-ui';
import { range } from 'lodash';
import IconButton from 'material-ui/IconButton';
@@ -26,7 +26,8 @@ import Input from '~/ui/Form/Input';
import InputAddressSelect from '~/ui/Form/InputAddressSelect';
import Select from '~/ui/Form/Select';
-import { ABI_TYPES } from '../../../util/abi';
+import { ABI_TYPES } from '~/util/abi';
+import { fromWei, toWei } from '~/api/util/wei';
import styles from './typedInput.css';
@@ -42,16 +43,29 @@ export default class TypedInput extends Component {
label: PropTypes.string,
hint: PropTypes.string,
min: PropTypes.number,
- max: PropTypes.number
+ max: PropTypes.number,
+ isEth: PropTypes.bool
};
static defaultProps = {
min: null,
- max: null
+ max: null,
+ isEth: false
};
+ state = {
+ isEth: true,
+ ethValue: 0
+ };
+
+ componentDidMount () {
+ if (this.props.isEth && this.props.value) {
+ this.setState({ ethValue: fromWei(this.props.value) });
+ }
+ }
+
render () {
- const { param } = this.props;
+ const { param, isEth } = this.props;
const { type } = param;
if (type === ABI_TYPES.ARRAY) {
@@ -87,6 +101,10 @@ export default class TypedInput extends Component {
);
}
+ if (isEth) {
+ return this.renderEth();
+ }
+
return this.renderType(type);
}
@@ -157,16 +175,43 @@ export default class TypedInput extends Component {
return this.renderDefault();
}
- renderNumber () {
- const { label, value, error, param, hint, min, max } = this.props;
+ renderEth () {
+ const { ethValue } = this.state;
+
+ const value = ethValue && typeof ethValue.toNumber === 'function'
+ ? ethValue.toNumber()
+ : ethValue;
+
+ return (
+
+
+ { this.renderNumber(value, this.onEthValueChange) }
+ { this.state.isEth ? (
ETH
) : null }
+
+
+
+
+
+ );
+ }
+
+ renderNumber (value = this.props.value, onChange = this.onChange) {
+ const { label, error, param, hint, min, max } = this.props;
+ const realValue = value && typeof value.toNumber === 'function'
+ ? value.toNumber()
+ : value;
return (
{
+ const { isEth, ethValue } = this.state;
+
+ if (ethValue === '' || ethValue === undefined) {
+ return this.setState({ isEth: !isEth });
+ }
+
+ const value = isEth ? toWei(ethValue) : fromWei(ethValue);
+ this.setState({ isEth: !isEth, ethValue: value }, () => {
+ this.onEthValueChange(null, value);
+ });
+ }
+
+ onEthValueChange = (event, value) => {
+ const realValue = this.state.isEth && value !== '' && value !== undefined
+ ? toWei(value)
+ : value;
+
+ this.setState({ ethValue: value });
+ this.props.onChange(realValue);
+ }
+
onChange = (event, value) => {
this.props.onChange(value);
}
diff --git a/js/src/ui/IdentityName/identityName.js b/js/src/ui/IdentityName/identityName.js
index 85ff34a35..9da886ba0 100644
--- a/js/src/ui/IdentityName/identityName.js
+++ b/js/src/ui/IdentityName/identityName.js
@@ -37,17 +37,16 @@ class IdentityName extends Component {
render () {
const { address, accountsInfo, tokens, empty, name, shorten, unknown, className } = this.props;
const account = accountsInfo[address] || tokens[address];
- const hasAccount = account && (!account.meta || !account.meta.deleted);
- if (!hasAccount && empty) {
+ if (!account && empty) {
return null;
}
const addressFallback = shorten ? ( ) : address;
const fallback = unknown ? defaultName : addressFallback;
- const isUuid = hasAccount && account.name === account.uuid;
+ const isUuid = account && account.name === account.uuid;
const displayName = (name && name.toUpperCase().trim()) ||
- (hasAccount && !isUuid
+ (account && !isUuid
? account.name.toUpperCase().trim()
: fallback);
diff --git a/js/src/util/validation.js b/js/src/util/validation.js
index 0666f1ad3..2b64141db 100644
--- a/js/src/util/validation.js
+++ b/js/src/util/validation.js
@@ -140,7 +140,7 @@ export function validateUint (value) {
const bn = new BigNumber(value);
if (bn.lt(0)) {
valueError = ERRORS.negativeNumber;
- } else if (bn.toString().indexOf('.') !== -1) {
+ } else if (!bn.isInteger()) {
valueError = ERRORS.decimalNumber;
}
} catch (e) {
diff --git a/js/src/views/Accounts/List/list.js b/js/src/views/Accounts/List/list.js
index c2e961bb8..4d54b640f 100644
--- a/js/src/views/Accounts/List/list.js
+++ b/js/src/views/Accounts/List/list.js
@@ -24,6 +24,7 @@ import styles from './list.css';
export default class List extends Component {
static propTypes = {
accounts: PropTypes.object,
+ walletsOwners: PropTypes.object,
balances: PropTypes.object,
link: PropTypes.string,
search: PropTypes.array,
@@ -42,7 +43,7 @@ export default class List extends Component {
}
renderAccounts () {
- const { accounts, balances, link, empty, handleAddSearchToken } = this.props;
+ const { accounts, balances, link, empty, handleAddSearchToken, walletsOwners } = this.props;
if (empty) {
return (
@@ -60,6 +61,8 @@ export default class List extends Component {
const account = accounts[address] || {};
const balance = balances[address] || {};
+ const owners = walletsOwners && walletsOwners[address] || null;
+
return (
);
diff --git a/js/src/views/Accounts/Summary/summary.js b/js/src/views/Accounts/Summary/summary.js
index 842629c6f..764f24edf 100644
--- a/js/src/views/Accounts/Summary/summary.js
+++ b/js/src/views/Accounts/Summary/summary.js
@@ -17,8 +17,12 @@
import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import { isEqual } from 'lodash';
+import ReactTooltip from 'react-tooltip';
import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags, Input } from '~/ui';
+import { nullableProptype } from '~/util/proptypes';
+
+import styles from '../accounts.css';
export default class Summary extends Component {
static contextTypes = {
@@ -31,7 +35,8 @@ export default class Summary extends Component {
link: PropTypes.string,
name: PropTypes.string,
noLink: PropTypes.bool,
- handleAddSearchToken: PropTypes.func
+ handleAddSearchToken: PropTypes.func,
+ owners: nullableProptype(PropTypes.array)
};
static defaultProps = {
@@ -100,11 +105,41 @@ export default class Summary extends Component {
title={ this.renderLink() }
byline={ addressComponent } />
+ { this.renderOwners() }
{ this.renderBalance() }
);
}
+ renderOwners () {
+ const { owners } = this.props;
+
+ if (!owners || owners.length === 0) {
+ return null;
+ }
+
+ return (
+
+ {
+ owners.map((owner) => (
+
+
+
+
+
+ { owner.name } (owner)
+
+
+ ))
+ }
+
+ );
+ }
+
renderLink () {
const { link, noLink, account, name } = this.props;
diff --git a/js/src/views/Accounts/accounts.css b/js/src/views/Accounts/accounts.css
index 0ed8b5256..469f33ddc 100644
--- a/js/src/views/Accounts/accounts.css
+++ b/js/src/views/Accounts/accounts.css
@@ -22,6 +22,12 @@
left: 7em;
}
+.owners {
+ margin-top: 1em;
+ display: flex;
+ margin-bottom: -0.5em;
+}
+
.toolbar {
position: relative;
}
diff --git a/js/src/views/Accounts/accounts.js b/js/src/views/Accounts/accounts.js
index f71426aec..a8a29945f 100644
--- a/js/src/views/Accounts/accounts.js
+++ b/js/src/views/Accounts/accounts.js
@@ -37,6 +37,7 @@ class Accounts extends Component {
accounts: PropTypes.object.isRequired,
hasAccounts: PropTypes.bool.isRequired,
wallets: PropTypes.object.isRequired,
+ walletsOwners: PropTypes.object.isRequired,
hasWallets: PropTypes.bool.isRequired,
balances: PropTypes.object
@@ -137,9 +138,13 @@ class Accounts extends Component {
return this.renderLoading(this.props.wallets);
}
- const { wallets, hasWallets, balances } = this.props;
+ const { wallets, hasWallets, balances, walletsOwners } = this.props;
const { searchValues, sortOrder } = this.state;
+ if (!wallets || Object.keys(wallets).length === 0) {
+ return null;
+ }
+
return (
);
}
@@ -281,13 +287,29 @@ class Accounts extends Component {
}
function mapStateToProps (state) {
- const { accounts, hasAccounts, wallets, hasWallets } = state.personal;
+ const { accounts, hasAccounts, wallets, hasWallets, accountsInfo } = state.personal;
const { balances } = state.balances;
+ const walletsInfo = state.wallet.wallets;
+
+ const walletsOwners = Object
+ .keys(walletsInfo)
+ .map((wallet) => ({
+ owners: walletsInfo[wallet].owners.map((owner) => ({
+ address: owner,
+ name: accountsInfo[owner] && accountsInfo[owner].name || owner
+ })),
+ address: wallet
+ }))
+ .reduce((walletsOwners, wallet) => {
+ walletsOwners[wallet.address] = wallet.owners;
+ return walletsOwners;
+ }, {});
return {
accounts,
hasAccounts,
wallets,
+ walletsOwners,
hasWallets,
balances
};
diff --git a/js/src/views/Address/Delete/delete.js b/js/src/views/Address/Delete/delete.js
index d1501ab8b..2d19f2141 100644
--- a/js/src/views/Address/Delete/delete.js
+++ b/js/src/views/Address/Delete/delete.js
@@ -80,10 +80,8 @@ class Delete extends Component {
const { api, router } = this.context;
const { account, route, newError } = this.props;
- account.meta.deleted = true;
-
api.parity
- .setAccountMeta(account.address, account.meta)
+ .removeAddress(account.address)
.then(() => {
router.push(route);
this.closeDeleteDialog();
diff --git a/js/src/views/Address/address.js b/js/src/views/Address/address.js
index 6c0ff0920..0fae3cb1f 100644
--- a/js/src/views/Address/address.js
+++ b/js/src/views/Address/address.js
@@ -121,7 +121,7 @@ class Address extends Component {
return (
+ buttons={ !contact ? [] : buttons } />
);
}
diff --git a/js/src/views/Contract/contract.js b/js/src/views/Contract/contract.js
index 8ae4fcb33..2aa37f847 100644
--- a/js/src/views/Contract/contract.js
+++ b/js/src/views/Contract/contract.js
@@ -229,7 +229,7 @@ class Contract extends Component {
return (
+ buttons={ !account ? [] : buttons } />
);
}
diff --git a/js/src/views/Wallet/Confirmations/confirmations.js b/js/src/views/Wallet/Confirmations/confirmations.js
index 468e55136..7e7e74032 100644
--- a/js/src/views/Wallet/Confirmations/confirmations.js
+++ b/js/src/views/Wallet/Confirmations/confirmations.js
@@ -60,12 +60,14 @@ class WalletConfirmations extends Component {
}
renderConfirmations () {
const { confirmations, ...others } = this.props;
+ const realConfirmations = confirmations && confirmations
+ .filter((conf) => conf.confirmedBy.length > 0);
- if (!confirmations) {
+ if (!realConfirmations) {
return null;
}
- if (confirmations.length === 0) {
+ if (realConfirmations.length === 0) {
return (
No transactions needs confirmation right now.
@@ -73,13 +75,14 @@ class WalletConfirmations extends Component {
);
}
- return confirmations.map((confirmation) => (
-
- ));
+ return realConfirmations
+ .map((confirmation) => (
+
+ ));
}
}
@@ -320,22 +323,35 @@ class WalletConfirmation extends Component {
const { address, isTest } = this.props;
const { operation, transactionHash, blockNumber, value, to, data } = confirmation;
+ if (value && to && data) {
+ return (
+
+ );
+ }
+
return (
-
+ className={ className }
+ >
+
+ { operation }
+
+
);
}
diff --git a/js/src/views/Wallet/wallet.js b/js/src/views/Wallet/wallet.js
index 4aa3c8dd7..e67eaefdb 100644
--- a/js/src/views/Wallet/wallet.js
+++ b/js/src/views/Wallet/wallet.js
@@ -22,9 +22,10 @@ import moment from 'moment';
import ContentCreate from 'material-ui/svg-icons/content/create';
import ActionDelete from 'material-ui/svg-icons/action/delete';
import ContentSend from 'material-ui/svg-icons/content/send';
+import SettingsIcon from 'material-ui/svg-icons/action/settings';
import { nullableProptype } from '~/util/proptypes';
-import { EditMeta, Transfer } from '~/modals';
+import { EditMeta, Transfer, WalletSettings } from '~/modals';
import { Actionbar, Button, Page, Loading } from '~/ui';
import Delete from '../Address/Delete';
@@ -74,6 +75,7 @@ class Wallet extends Component {
state = {
showEditDialog: false,
+ showSettingsDialog: false,
showTransferDialog: false,
showDeleteDialog: false
};
@@ -115,6 +117,7 @@ class Wallet extends Component {
return (
{ this.renderEditDialog(wallet) }
+ { this.renderSettingsDialog() }
{ this.renderTransferDialog() }
{ this.renderDeleteDialog(wallet) }
{ this.renderActionbar() }
@@ -212,13 +215,18 @@ class Wallet extends Component {
}
- label='delete wallet'
+ label='delete'
onClick={ this.showDeleteDialog } />,
}
label='edit'
- onClick={ this.onEditClick } />
+ onClick={ this.onEditClick } />,
+
}
+ label='settings'
+ onClick={ this.onSettingsClick } />
];
return (
@@ -250,11 +258,27 @@ class Wallet extends Component {
return (
);
}
+ renderSettingsDialog () {
+ const { wallet } = this.props;
+ const { showSettingsDialog } = this.state;
+
+ if (!showSettingsDialog) {
+ return null;
+ }
+
+ return (
+
+ );
+ }
+
renderTransferDialog () {
const { showTransferDialog } = this.state;
@@ -281,6 +305,12 @@ class Wallet extends Component {
});
}
+ onSettingsClick = () => {
+ this.setState({
+ showSettingsDialog: !this.state.showSettingsDialog
+ });
+ }
+
onTransferClick = () => {
this.setState({
showTransferDialog: !this.state.showTransferDialog
diff --git a/rpc/rpctest/Cargo.toml b/rpc/rpctest/Cargo.toml
index 37248ccc3..19c7feb7c 100644
--- a/rpc/rpctest/Cargo.toml
+++ b/rpc/rpctest/Cargo.toml
@@ -1,7 +1,7 @@
[package]
description = "Rpc test client."
name = "rpctest"
-version = "1.4.0"
+version = "1.5.0"
license = "GPL-3.0"
authors = ["Ethcore
"]
diff --git a/rpc/src/v1/impls/parity_accounts.rs b/rpc/src/v1/impls/parity_accounts.rs
index ea927de4e..188e2290e 100644
--- a/rpc/src/v1/impls/parity_accounts.rs
+++ b/rpc/src/v1/impls/parity_accounts.rs
@@ -57,7 +57,7 @@ impl ParityAccounts for ParityAccountsClient where C: MiningBlock
let info = try!(store.accounts_info().map_err(|e| errors::account("Could not fetch account info.", e)));
let other = store.addresses_info().expect("addresses_info always returns Ok; qed");
- Ok(info.into_iter().chain(other.into_iter()).map(|(a, v)| {
+ Ok(other.into_iter().chain(info.into_iter()).map(|(a, v)| {
let m = map![
"name".to_owned() => to_value(&v.name),
"meta".to_owned() => to_value(&v.meta),
@@ -126,6 +126,16 @@ impl ParityAccounts for ParityAccountsClient where C: MiningBlock
.map_err(|e| errors::account("Could not delete account.", e))
}
+ fn remove_address(&self, addr: RpcH160) -> Result {
+ try!(self.active());
+ let store = take_weak!(self.accounts);
+ let addr: Address = addr.into();
+
+ store.remove_address(addr)
+ .expect("remove_address always returns Ok; qed");
+ Ok(true)
+ }
+
fn set_account_name(&self, addr: RpcH160, name: String) -> Result {
try!(self.active());
let store = take_weak!(self.accounts);
diff --git a/rpc/src/v1/tests/mocked/parity_accounts.rs b/rpc/src/v1/tests/mocked/parity_accounts.rs
index 3b1899f38..8b42500e6 100644
--- a/rpc/src/v1/tests/mocked/parity_accounts.rs
+++ b/rpc/src/v1/tests/mocked/parity_accounts.rs
@@ -152,3 +152,32 @@ fn should_be_able_to_kill_account() {
let accounts = tester.accounts.accounts().unwrap();
assert_eq!(accounts.len(), 0);
}
+
+#[test]
+fn should_be_able_to_remove_address() {
+ let tester = setup();
+
+ // add an address
+ let request = r#"{"jsonrpc": "2.0", "method": "parity_setAccountName", "params": ["0x000baba1000baba2000baba3000baba4000baba5", "Test"], "id": 1}"#;
+ let response = r#"{"jsonrpc":"2.0","result":true,"id":1}"#;
+ let res = tester.io.handle_request_sync(&request);
+ assert_eq!(res, Some(response.into()));
+
+ // verify it exists
+ let request = r#"{"jsonrpc": "2.0", "method": "parity_accountsInfo", "params": [], "id": 2}"#;
+ let res = tester.io.handle_request_sync(request);
+ let response = r#"{"jsonrpc":"2.0","result":{"0x000baba1000baba2000baba3000baba4000baba5":{"meta":"{}","name":"Test","uuid":null}},"id":2}"#;
+ assert_eq!(res, Some(response.into()));
+
+ // remove the address
+ let request = r#"{"jsonrpc": "2.0", "method": "parity_removeAddress", "params": ["0x000baba1000baba2000baba3000baba4000baba5"], "id": 3}"#;
+ let response = r#"{"jsonrpc":"2.0","result":true,"id":3}"#;
+ let res = tester.io.handle_request_sync(&request);
+ assert_eq!(res, Some(response.into()));
+
+ // verify empty
+ let request = r#"{"jsonrpc": "2.0", "method": "parity_accountsInfo", "params": [], "id": 4}"#;
+ let res = tester.io.handle_request_sync(request);
+ let response = r#"{"jsonrpc":"2.0","result":{},"id":4}"#;
+ assert_eq!(res, Some(response.into()));
+}
diff --git a/rpc/src/v1/traits/parity_accounts.rs b/rpc/src/v1/traits/parity_accounts.rs
index f72802959..6cfe1bf7b 100644
--- a/rpc/src/v1/traits/parity_accounts.rs
+++ b/rpc/src/v1/traits/parity_accounts.rs
@@ -58,6 +58,11 @@ build_rpc_trait! {
#[rpc(name = "parity_killAccount")]
fn kill_account(&self, H160, String) -> Result;
+ /// Permanently deletes an address from the addressbook
+ /// Arguments: `address`
+ #[rpc(name = "parity_removeAddress")]
+ fn remove_address(&self, H160) -> Result;
+
/// Set an account's name.
#[rpc(name = "parity_setAccountName")]
fn set_account_name(&self, H160, String) -> Result;
@@ -83,4 +88,3 @@ build_rpc_trait! {
fn geth_accounts(&self) -> Result, Error>;
}
}
-
diff --git a/stratum/Cargo.toml b/stratum/Cargo.toml
index 28f5208dd..609f4ee9b 100644
--- a/stratum/Cargo.toml
+++ b/stratum/Cargo.toml
@@ -1,7 +1,7 @@
[package]
description = "Ethcore stratum lib"
name = "ethcore-stratum"
-version = "1.4.0"
+version = "1.5.0"
license = "GPL-3.0"
authors = ["Ethcore "]
build = "build.rs"
diff --git a/test.sh b/test.sh
index 3e9074478..f5a636bab 100755
--- a/test.sh
+++ b/test.sh
@@ -2,7 +2,7 @@
# Running Parity Full Test Sute
FEATURES="json-tests"
-OPTIONS="--verbose --release"
+OPTIONS="--release"
case $1 in
--no-json)