nym-client: swapping bs58 for base64

This commit is contained in:
Dave Hrycyszyn
2020-01-27 11:35:11 +00:00
parent 83aa0a37b1
commit c94691d68e
2 changed files with 3 additions and 5 deletions
+1 -3
View File
@@ -142,9 +142,7 @@ impl ClientRequest {
.providers()
.iter()
.flat_map(|provider| provider.registered_clients.iter())
.filter_map(|client| {
base64::decode_config(&client.pub_key, base64::URL_SAFE).ok()
})
.filter_map(|client| bs58::decode(&client.pub_key).into_vec().ok())
.collect();
ServerResponse::GetClients { clients }
}
+2 -2
View File
@@ -199,7 +199,7 @@ impl ClientRequest {
};
}
let address_vec = match base64::decode_config(&recipient_address, base64::URL_SAFE) {
let address_vec = match bs58::decode(&recipient_address).into_vec() {
Err(e) => {
return ServerResponse::Error {
message: e.to_string(),
@@ -280,7 +280,7 @@ impl ClientRequest {
}
async fn handle_own_details(self_address_bytes: DestinationAddressBytes) -> ServerResponse {
let self_address = base64::encode_config(&self_address_bytes, base64::URL_SAFE);
let self_address = bs58::encode(&self_address_bytes).into_string();
ServerResponse::OwnDetails {
address: self_address,
}