Skip to content

Commit aeeb62b

Browse files
committed
Merge branch 'master' of github.com:cgilliard/mwc
2 parents 3895819 + 3b67f5f commit aeeb62b

File tree

9 files changed

+26
-21
lines changed

9 files changed

+26
-21
lines changed

config/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ use crate::wallet::WalletConfig;
3939
/// the node config file location
4040
pub const SERVER_CONFIG_FILE_NAME: &'static str = "mwc-server.toml";
4141
/// And a wallet configuration file name
42-
pub const WALLET_CONFIG_FILE_NAME: &'static str = "grin-wallet.toml";
42+
pub const WALLET_CONFIG_FILE_NAME: &'static str = "mwc-wallet.toml";
4343
const SERVER_LOG_FILE_NAME: &'static str = "mwc-server.log";
44-
const WALLET_LOG_FILE_NAME: &'static str = "grin-wallet.log";
44+
const WALLET_LOG_FILE_NAME: &'static str = "mwc-wallet.log";
4545
const MWC_HOME: &'static str = ".mwc";
4646
const MWC_CHAIN_DIR: &'static str = "chain_data";
4747
/// Wallet data directory

doc/api/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This document contains the documentation for the 3 Grin REST APIs. These endpoin
55
## Node API
66

77
This endpoint is used to query a node about various information on the blockchain, networks and peers. By default, this REST API will listen on `localhost:3413`. This API is started as the same time as the Grin node.
8-
This endpoint requires, by default, [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). The username is `grin` and the password can be found in the `.api_secret` file.
8+
This endpoint requires, by default, [Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). The username is `mwc` and the password can be found in the `.api_secret` file.
99
To learn about what specific calls can be made read the [node API doc](node_api.md).
1010

1111
## Wallet APIs
@@ -21,7 +21,7 @@ The wallet owner API is an endpoint to manage the user wallet: broadcast transac
2121

2222
__This endpoint must **never** be exposed to the outside world.__
2323

24-
This endpoint requires, by default, Basic Authentication. The username is `grin` and the password can be found in the `.api_secret` file.
24+
This endpoint requires, by default, Basic Authentication. The username is `mwc` and the password can be found in the `.api_secret` file.
2525
To learn about what specific calls can be made read the [wallet owner API doc](wallet_owner_api.md).
2626

2727
## Ports above 10000?

doc/wallet/tls-setup.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you don't have a static IP you may want to consider using services like DynDN
1010
If you don't have a domain name there is a possibility to get a TLS certificate for your IP, but you have to pay for that (so perhaps it's cheaper to buy a domain name) and it's rarely supported by certificate providers.
1111

1212
## I have a TLS certificate already
13-
Uncomment and update the following lines in wallet config (by default `~/.grin/grin-wallet.toml`):
13+
Uncomment and update the following lines in wallet config (by default `~/.mwc/mwc-wallet.toml`):
1414

1515
```toml
1616
tls_certificate_file = "/path/to/my/cerificate/fullchain.pem"
@@ -29,7 +29,7 @@ Or, in case you are using DynDNS or `localhost` in order to comunicate with your
2929
api_listen_interface = "0.0.0.0"
3030
```
3131

32-
If you have Stratum server enabled (you run a miner) make sure that wallet listener URL starts with `https` in node config (by default `~/.grin/grin-server.toml`):
32+
If you have Stratum server enabled (you run a miner) make sure that wallet listener URL starts with `https` in node config (by default `~/.mwc/mwc-server.toml`):
3333

3434
```toml
3535
wallet_listener_url = "https://grin1.example.com:13415"

servers/src/webwallet/server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl MainService {
6060
// Set up directory relative to executable for the time being
6161
let mut exe_path = env::current_exe().unwrap();
6262
exe_path.pop();
63-
exe_path.push("grin-wallet");
63+
exe_path.push("mwc-wallet");
6464
MainService {
6565
static_: Static::new(exe_path),
6666
}

src/bin/cmd/wallet_args.rs

+2
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ pub fn parse_global_args(
195195
if args.is_present("show_spent") {
196196
show_spent = true;
197197
}
198+
let owner_api_secret = get_first_line(config.api_secret_path.clone());
198199
let node_api_secret = get_first_line(config.node_api_secret_path.clone());
199200
let password = match args.value_of("pass") {
200201
None => None,
@@ -218,6 +219,7 @@ pub fn parse_global_args(
218219
Ok(command::GlobalArgs {
219220
account: account.to_owned(),
220221
show_spent: show_spent,
222+
owner_api_secret: owner_api_secret,
221223
node_api_secret: node_api_secret,
222224
password: password,
223225
tls_conf: tls_conf,

src/bin/cmd/wallet_tests.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ mod wallet_tests {
5959
current_dir.push(wallet_name);
6060
let _ = fs::create_dir_all(current_dir.clone());
6161
let mut config_file_name = current_dir.clone();
62-
config_file_name.push("grin-wallet.toml");
62+
config_file_name.push("mwc-wallet.toml");
6363
if config_file_name.exists() {
6464
return Err(grin_wallet::ErrorKind::ArgumentError(
65-
"grin-wallet.toml already exists in the target directory. Please remove it first"
65+
"mwc-wallet.toml already exists in the target directory. Please remove it first"
6666
.to_owned(),
6767
))?;
6868
}
@@ -90,7 +90,7 @@ mod wallet_tests {
9090
current_dir.push(wallet_name);
9191
let _ = fs::create_dir_all(current_dir.clone());
9292
let mut config_file_name = current_dir.clone();
93-
config_file_name.push("grin-wallet.toml");
93+
config_file_name.push("mwc-wallet.toml");
9494
GlobalWalletConfig::new(config_file_name.to_str().unwrap())
9595
.unwrap()
9696
.members

src/bin/mwc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ subcommands:
275275
about: Initialize a new wallet seed file and database
276276
args:
277277
- here:
278-
help: Create wallet files in the current directory instead of the default ~/.grin directory
278+
help: Create wallet files in the current directory instead of the default ~/.mwc directory
279279
short: h
280280
long: here
281281
takes_value: false

src/build/build.rs

+11-9
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@
1616
1717
use built;
1818

19-
use reqwest;
19+
//use reqwest;
2020

21-
use flate2::read::GzDecoder;
21+
//use flate2::read::GzDecoder;
2222
use std::env;
23-
use std::fs::{self, File};
24-
use std::io::prelude::*;
25-
use std::io::Read;
26-
use std::path::{self, Path, PathBuf};
23+
//use std::fs::{self, File}
24+
//use std::io::prelude::*;
25+
//use std::io::Read;
26+
//use std::path::{self, Path, PathBuf};
27+
use std::path::PathBuf;
2728
use std::process::Command;
2829

29-
use tar::Archive;
30+
//use tar::Archive;
3031

31-
const _WEB_WALLET_TAG: &str = "0.3.0.1";
32+
//const _WEB_WALLET_TAG: &str = "0.3.0.1";
3233

3334
fn main() {
3435
// Setting up git hooks in the project: rustfmt and so on.
@@ -70,6 +71,7 @@ fn main() {
7071
}*/
7172
}
7273

74+
/*
7375
fn _download_and_decompress(target_file: &str) -> Result<bool, Box<std::error::Error>> {
7476
let req_path = format!("https://github.com/mimblewimble/grin-web-wallet/releases/download/{}/grin-web-wallet.tar.gz", _WEB_WALLET_TAG);
7577
let mut resp = reqwest::get(&req_path)?;
@@ -147,4 +149,4 @@ fn _install_web_wallet() -> Result<bool, Box<std::error::Error>> {
147149
}
148150
149151
Ok(true)
150-
}
152+
}*/

wallet/src/command.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ use crate::{
3939
#[derive(Clone)]
4040
pub struct GlobalArgs {
4141
pub account: String,
42+
pub owner_api_secret: Option<String>,
4243
pub node_api_secret: Option<String>,
4344
pub show_spent: bool,
4445
pub password: Option<ZeroingString>,
@@ -146,7 +147,7 @@ pub fn owner_api(
146147
let res = controller::owner_listener(
147148
wallet,
148149
config.owner_api_listen_addr().as_str(),
149-
g_args.node_api_secret.clone(),
150+
g_args.owner_api_secret.clone(),
150151
g_args.tls_conf.clone(),
151152
config.owner_api_include_foreign.clone(),
152153
);

0 commit comments

Comments
 (0)