Skip to content

Commit b741ed6

Browse files
authored
Merge pull request #52 from mwcproject/send_fix
fix for init_send_tx api with defined send arguments
2 parents b335d62 + 0f3ca36 commit b741ed6

File tree

9 files changed

+254
-261
lines changed

9 files changed

+254
-261
lines changed

Cargo.lock

Lines changed: 198 additions & 221 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format."
66
license = "Apache-2.0"
@@ -36,12 +36,12 @@ funty = "=1.1.0"
3636
uuid = { version = "0.8", features = ["serde", "v4"] }
3737
shlex = "1.3.0"
3838

39-
mwc_wallet_api = { path = "./api", version = "5.3.5" }
40-
mwc_wallet_impls = { path = "./impls", version = "5.3.5" }
41-
mwc_wallet_libwallet = { path = "./libwallet", version = "5.3.5" }
42-
mwc_wallet_controller = { path = "./controller", version = "5.3.5" }
43-
mwc_wallet_config = { path = "./config", version = "5.3.5" }
44-
mwc_wallet_util = { path = "./util", version = "5.3.5" }
39+
mwc_wallet_api = { path = "./api", version = "5.3.6" }
40+
mwc_wallet_impls = { path = "./impls", version = "5.3.6" }
41+
mwc_wallet_libwallet = { path = "./libwallet", version = "5.3.6" }
42+
mwc_wallet_controller = { path = "./controller", version = "5.3.6" }
43+
mwc_wallet_config = { path = "./config", version = "5.3.6" }
44+
mwc_wallet_util = { path = "./util", version = "5.3.6" }
4545

4646
[build-dependencies]
4747
built = { version = "0.4", features = ["git2"]}

api/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_api"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Mwc Wallet API"
66
license = "Apache-2.0"
@@ -24,10 +24,10 @@ colored = "1.6"
2424
x25519-dalek = "0.6"
2525
easy-jsonrpc-mwc = { git = "https://github.com/mwcproject/easy-jsonrpc-mwc", version = "0.5.5", branch = "master" }
2626

27-
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.5" }
28-
mwc_wallet_config = { path = "../config", version = "5.3.5" }
29-
mwc_wallet_impls = { path = "../impls", version = "5.3.5" }
30-
mwc_wallet_util = { path = "../util", version = "5.3.5" }
27+
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.6" }
28+
mwc_wallet_config = { path = "../config", version = "5.3.6" }
29+
mwc_wallet_impls = { path = "../impls", version = "5.3.6" }
30+
mwc_wallet_util = { path = "../util", version = "5.3.6" }
3131

3232
[dev-dependencies]
3333
serde_json = "1"

api/src/owner.rs

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -814,18 +814,34 @@ where
814814
// Checking is sender didn't do any harm to slate
815815
Slate::compare_slates_send(&original_slate, &slate)?;
816816

817-
self.verify_slate_messages(keychain_mask, &slate)
818-
.map_err(|e| {
819-
error!(
820-
"Unable to validate participant messages at slate {}: {}",
821-
slate.id, e
822-
);
823-
e
824-
})?;
825-
826-
self.tx_lock_outputs(keychain_mask, &slate, address, 0)?;
817+
owner::verify_slate_messages(&slate).map_err(|e| {
818+
error!(
819+
"Unable to validate participant messages at slate {}: {}",
820+
slate.id, e
821+
);
822+
e
823+
})?;
824+
825+
owner::tx_lock_outputs(
826+
&mut **w,
827+
keychain_mask,
828+
&slate,
829+
address,
830+
0,
831+
self.doctest_mode,
832+
)?;
833+
827834
slate = match sa.finalize {
828-
true => self.finalize_tx(keychain_mask, &slate)?,
835+
true => {
836+
let (slate_res, _context) = owner::finalize_tx(
837+
&mut **w,
838+
keychain_mask,
839+
&slate,
840+
true,
841+
self.doctest_mode,
842+
)?;
843+
slate_res
844+
}
829845
false => slate,
830846
};
831847
println!(
@@ -834,7 +850,7 @@ where
834850
);
835851

836852
if sa.post_tx {
837-
self.post_tx(keychain_mask, slate.tx_or_err()?, sa.fluff)?;
853+
owner::post_tx(w.w2n_client(), slate.tx_or_err()?, sa.fluff)?;
838854
}
839855
println!(
840856
"slate [{}] posted successfully in owner_api",

config/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_config"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Configuration for mwc wallet , a simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format."
66
license = "Apache-2.0"
@@ -17,7 +17,7 @@ toml = "0.5"
1717
serde_derive = "1"
1818
thiserror = "1"
1919

20-
mwc_wallet_util = { path = "../util", version = "5.3.5" }
20+
mwc_wallet_util = { path = "../util", version = "5.3.6" }
2121

2222
[dev-dependencies]
2323
pretty_assertions = "0.6"

controller/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_controller"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Controllers for mwc wallet instantiation"
66
license = "Apache-2.0"
@@ -36,11 +36,11 @@ mwc-libp2p = { git = "https://github.com/mwcproject/rust-libp2p", version="0.35.
3636
#libp2p = { path = "../../rust-libp2p", default-features = false, features = [ "noise", "yamux", "mplex", "dns", "tcp-tokio", "ping", "gossipsub"] }
3737
easy-jsonrpc-mwc = { git = "https://github.com/mwcproject/easy-jsonrpc-mwc", version = "0.5.5", branch = "master" }
3838

39-
mwc_wallet_util = { path = "../util", version = "5.3.5" }
40-
mwc_wallet_api = { path = "../api", version = "5.3.5" }
41-
mwc_wallet_impls = { path = "../impls", version = "5.3.5" }
42-
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.5" }
43-
mwc_wallet_config = { path = "../config", version = "5.3.5" }
39+
mwc_wallet_util = { path = "../util", version = "5.3.6" }
40+
mwc_wallet_api = { path = "../api", version = "5.3.6" }
41+
mwc_wallet_impls = { path = "../impls", version = "5.3.6" }
42+
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.6" }
43+
mwc_wallet_config = { path = "../config", version = "5.3.6" }
4444

4545
[dev-dependencies]
4646
remove_dir_all = "0.7"

impls/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_impls"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Concrete types derived from libwallet traits"
66
license = "Apache-2.0"
@@ -41,9 +41,9 @@ url = "2.1"
4141
mwc-libp2p = { git = "https://github.com/mwcproject/rust-libp2p", version="0.35.3", branch = "master", default-features = false, features = [ "noise", "yamux", "mplex", "dns", "tcp-tokio", "ping", "gossipsub"] }
4242
#libp2p = { path = "../../rust-libp2p", default-features = false, features = [ "noise", "yamux", "mplex", "dns", "tcp-tokio", "ping", "gossipsub"] }
4343

44-
mwc_wallet_util = { path = "../util", version = "5.3.5" }
45-
mwc_wallet_config = { path = "../config", version = "5.3.5" }
46-
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.5" }
44+
mwc_wallet_util = { path = "../util", version = "5.3.6" }
45+
mwc_wallet_config = { path = "../config", version = "5.3.6" }
46+
mwc_wallet_libwallet = { path = "../libwallet", version = "5.3.6" }
4747

4848
[dev-dependencies]
4949
"remove_dir_all" = "0.7"

libwallet/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_libwallet"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Simple, private and scalable cryptocurrency implementation based on the MimbleWimble chain format."
66
license = "Apache-2.0"
@@ -76,8 +76,8 @@ mwc-zcash_primitives = { git = "https://github.com/mwcproject/librustzcash", ver
7676
#zcash_primitives = { path = "../../librustzcash/zcash_primitives", features = ["transparent-inputs"] }
7777

7878

79-
mwc_wallet_util = { path = "../util", version = "5.3.5" }
80-
mwc_wallet_config = { path = "../config", version = "5.3.5" }
79+
mwc_wallet_util = { path = "../util", version = "5.3.6" }
80+
mwc_wallet_config = { path = "../config", version = "5.3.6" }
8181

8282
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
8383
libc = { version = "0.2.69", default-features = false }

util/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mwc_wallet_util"
3-
version = "5.3.5"
3+
version = "5.3.6"
44
authors = ["Mwc Developers <[email protected]>"]
55
description = "Util, for generic utilities and to re-export mwc crates"
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)