* Porting json

* Dapps

* Rpc & Ethstore

* New ethabi

* Last bunch of fixes

* Fixing last test

* Removing build script

* Adding ethcore-ipc-tests back

* Fixing grumbles

* Fixing blockchain tests (inference regression?)
This commit is contained in:
Tomasz Drwięga
2017-02-13 16:38:47 +01:00
committed by Nikolay Volf
parent a2c6cd8f7b
commit f1e99ea2e4
68 changed files with 683 additions and 2480 deletions

View File

@@ -13,11 +13,6 @@ extern crate rand;
extern crate tempdir;
extern crate jsonrpc_core;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate matches;
#[macro_use]
extern crate log;

View File

@@ -1,5 +1,6 @@
use client::{Rpc, RpcError};
use rpc::v1::types::{ConfirmationRequest, TransactionModification, U256, TransactionCondition};
use serde;
use serde_json::{Value as JsonValue, to_value};
use std::path::PathBuf;
use futures::{BoxFuture, Canceled};
@@ -27,9 +28,9 @@ impl SignerRpc {
) -> BoxFuture<Result<U256, RpcError>, Canceled>
{
self.rpc.request("signer_confirmRequest", vec![
to_value(&format!("{:#x}", id)),
to_value(&TransactionModification { sender: None, gas_price: new_gas_price, gas: new_gas, condition: new_condition }),
to_value(&pwd),
Self::to_value(&format!("{:#x}", id)),
Self::to_value(&TransactionModification { sender: None, gas_price: new_gas_price, gas: new_gas, condition: new_condition }),
Self::to_value(&pwd),
])
}
pub fn reject_request(&mut self, id: U256) ->
@@ -39,4 +40,8 @@ impl SignerRpc {
JsonValue::String(format!("{:#x}", id))
])
}
fn to_value<T: serde::Serialize>(v: &T) -> JsonValue {
to_value(v).expect("Our types are always serializable; qed")
}
}