[beta] Backports (#6333)
* overflow check in addition * add test * Unexpose methods on UI RPC. (#6295) * Add more descriptive error when signing/decrypting using hw wallet. * format instant change proofs correctly * propagate stratum submit share error upstream, fixes #6258 (#6260) * updated jsonrpc (#6264) * Using multiple NTP servers (#6173) * Small improvements to time estimation. * Allow multiple NTP servers to be used. * Removing boxing. * Be nice. * Be nicer. * Update list of servers and add reference. * Fix dapps CSP when UI is exposed externally (#6178) * Allow embeding on any page when ui-hosts=all and fix dev_ui * Fix tests. * Fix cache path when using --base-path (#6212) * Time should not contribue to overall status. (#6276) * v1.7.1
This commit is contained in:
@@ -512,6 +512,10 @@ pub fn execute<D: Dispatcher + 'static>(
|
||||
).boxed()
|
||||
},
|
||||
ConfirmationPayload::EthSignMessage(address, data) => {
|
||||
if accounts.is_hardware_address(address) {
|
||||
return future::err(errors::unsupported("Signing via hardware wallets is not supported.", None)).boxed();
|
||||
}
|
||||
|
||||
let hash = eth_data_hash(data);
|
||||
let res = signature(&accounts, address, hash, pass)
|
||||
.map(|result| result
|
||||
@@ -522,6 +526,10 @@ pub fn execute<D: Dispatcher + 'static>(
|
||||
future::done(res).boxed()
|
||||
},
|
||||
ConfirmationPayload::Decrypt(address, data) => {
|
||||
if accounts.is_hardware_address(address) {
|
||||
return future::err(errors::unsupported("Decrypting via hardware wallets is not supported.", None)).boxed();
|
||||
}
|
||||
|
||||
let res = decrypt(&accounts, address, data, pass)
|
||||
.map(|result| result
|
||||
.map(RpcBytes)
|
||||
|
||||
@@ -71,6 +71,14 @@ pub fn public_unsupported(details: Option<String>) -> Error {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn unsupported<T: Into<String>>(msg: T, details: Option<T>) -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::UNSUPPORTED_REQUEST),
|
||||
message: msg.into(),
|
||||
data: details.map(Into::into).map(Value::String),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn request_not_found() -> Error {
|
||||
Error {
|
||||
code: ErrorCode::ServerError(codes::REQUEST_NOT_FOUND),
|
||||
|
||||
Reference in New Issue
Block a user