Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

No hardcoded client name #8368

Merged
merged 1 commit into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/web3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Web3Client {

impl Web3 for Web3Client {
fn client_version(&self) -> Result<String> {
Ok(version().to_owned().replace("Parity/", "Parity//"))
Ok(version().to_owned().replacen("/", "//", 1))
}

fn sha3(&self, data: Bytes) -> Result<H256> {
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/v1/tests/mocked/web3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn rpc_web3_version() {
let mut io = IoHandler::new();
io.extend_with(web3);

let v = version().to_owned().replace("Parity/", "Parity//");
let v = version().to_owned().replacen("/", "//", 1);

let request = r#"{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":"VER","id":1}"#.to_owned().replace("VER", v.as_ref());
Expand Down