diff --git a/Cargo.lock b/Cargo.lock index c9736ab..55ac12e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,32 +263,45 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-channel" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +dependencies = [ + "concurrent-queue", + "event-listener 3.1.0", + "event-listener-strategy", + "futures-core", + "pin-project-lite 0.2.13", +] + [[package]] name = "async-executor" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +checksum = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d" dependencies = [ - "async-lock", + "async-lock 3.1.1", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite", + "futures-lite 2.0.1", "slab", ] [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "9b4353121d5644cdf2beb5726ab752e79a8db1ebb52031770ec47db31d245526" dependencies = [ - "async-channel", + "async-channel 2.1.0", "async-executor", - "async-io 1.13.0", - "async-lock", + "async-io 2.2.0", + "async-lock 3.1.1", "blocking", - "futures-lite", + "futures-lite 2.0.1", "once_cell", ] @@ -298,11 +311,11 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg 1.1.0", "cfg-if 1.0.0", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", "polling 2.8.0", @@ -314,18 +327,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10da8f3146014722c89e7859e1d7bb97873125d7346d10ca642ffab794355828" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" dependencies = [ - "async-lock", + "async-lock 3.1.1", "cfg-if 1.0.0", "concurrent-queue", "futures-io", - "futures-lite", + "futures-lite 2.0.1", "parking", "polling 3.3.0", - "rustix 0.38.21", + "rustix 0.38.25", "slab", "tracing", "waker-fn", @@ -341,6 +354,17 @@ dependencies = [ "event-listener 2.5.3", ] +[[package]] +name = "async-lock" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105" +dependencies = [ + "event-listener 3.1.0", + "event-listener-strategy", + "pin-project-lite 0.2.13", +] + [[package]] name = "async-process" version = "1.8.1" @@ -348,13 +372,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ "async-io 1.13.0", - "async-lock", + "async-lock 2.8.0", "async-signal", "blocking", "cfg-if 1.0.0", - "event-listener 3.0.1", - "futures-lite", - "rustix 0.38.21", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -364,13 +388,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.1.0", - "async-lock", + "async-io 2.2.0", + "async-lock 2.8.0", "atomic-waker", "cfg-if 1.0.0", "futures-core", "futures-io", - "rustix 0.38.21", + "rustix 0.38.25", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -382,16 +406,16 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-global-executor", "async-io 1.13.0", - "async-lock", + "async-lock 2.8.0", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", @@ -659,16 +683,16 @@ dependencies = [ [[package]] name = "blocking" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.1.0", + "async-lock 3.1.1", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite", + "futures-lite 2.0.1", "piper", "tracing", ] @@ -718,7 +742,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1413,9 +1437,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "deflate" @@ -1513,7 +1537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users 0.4.4", "winapi 0.3.9", ] @@ -1524,7 +1548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users 0.4.3", + "redox_users 0.4.4", "winapi 0.3.9", ] @@ -1542,7 +1566,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -1671,9 +1695,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" +checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" dependencies = [ "libc", "windows-sys 0.48.0", @@ -1691,9 +1715,9 @@ dependencies = [ [[package]] name = "etagere" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf22f748754352918e082e0039335ee92454a5d62bcaf69b5e8daf5907d9644" +checksum = "306960881d6c46bd0dd6b7f07442a441418c08d0d3e63d8d080b0f64c6343e4e" dependencies = [ "euclid", "svg_fmt", @@ -1716,15 +1740,25 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cec0252c2afff729ee6f00e903d479fba81784c8e2bd77447673471fdfaea1" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" dependencies = [ "concurrent-queue", "parking", "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.1.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "fancy-regex" version = "0.5.0" @@ -1804,12 +1838,9 @@ checksum = "7bad48618fdb549078c333a7a8528acb57af271d0433bdecd523eb620628364e" [[package]] name = "float_next_after" -version = "0.1.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" -dependencies = [ - "num-traits 0.2.17", -] +checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" [[package]] name = "fluent" @@ -1832,7 +1863,7 @@ dependencies = [ "intl-memoizer", "intl_pluralrules", "rustc-hash", - "self_cell", + "self_cell 0.10.3", "smallvec", "unic-langid", ] @@ -1927,9 +1958,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -2057,6 +2088,20 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite 0.2.13", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -2065,7 +2110,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -2185,9 +2230,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "libc", @@ -2728,7 +2773,7 @@ dependencies = [ [[package]] name = "grin_wallet" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "built", "clap", @@ -2755,7 +2800,7 @@ dependencies = [ [[package]] name = "grin_wallet_api" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "base64 0.12.3", "chrono", @@ -2780,7 +2825,7 @@ dependencies = [ [[package]] name = "grin_wallet_config" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "dirs 2.0.2", "grin_core", @@ -2795,7 +2840,7 @@ dependencies = [ [[package]] name = "grin_wallet_controller" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "chrono", "easy-jsonrpc-mw", @@ -2829,7 +2874,7 @@ dependencies = [ [[package]] name = "grin_wallet_impls" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "base64 0.12.3", "blake2-rfc", @@ -2868,7 +2913,7 @@ dependencies = [ [[package]] name = "grin_wallet_libwallet" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "age", "base64 0.9.3", @@ -2909,7 +2954,7 @@ dependencies = [ [[package]] name = "grin_wallet_util" version = "5.2.0-beta.1" -source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#febffd4c6836707b31ef37c0354ef0fa533f6631" +source = "git+https://github.com/mimblewimble/grin-wallet?branch=contracts#b3d90c92e8a1e70c8d5e7c679cce369b03761dd6" dependencies = [ "data-encoding", "ed25519-dalek", @@ -2971,9 +3016,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.21" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes 1.5.0", "fnv", @@ -2981,9 +3026,9 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.1.0", "slab", - "tokio 1.33.0", + "tokio 1.34.0", "tokio-util 0.7.10", "tracing", ] @@ -3105,9 +3150,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes 1.5.0", "fnv", @@ -3196,7 +3241,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.21", + "h2 0.3.22", "http", "http-body 0.4.5", "httparse", @@ -3204,7 +3249,7 @@ dependencies = [ "itoa 1.0.9", "pin-project-lite 0.2.13", "socket2 0.4.10", - "tokio 1.33.0", + "tokio 1.34.0", "tower-service", "tracing", "want", @@ -3278,7 +3323,7 @@ dependencies = [ "bytes 1.5.0", "hyper 0.14.27", "native-tls", - "tokio 1.33.0", + "tokio 1.34.0", "tokio-native-tls", ] @@ -3292,7 +3337,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.6", + "toml 0.8.8", "unic-langid", ] @@ -3334,7 +3379,7 @@ dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", "strsim 0.10.0", - "syn 2.0.38", + "syn 2.0.39", "unic-langid", ] @@ -3348,7 +3393,7 @@ dependencies = [ "i18n-config", "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -3421,7 +3466,7 @@ dependencies = [ "futures 0.3.29", "iced_core", "log", - "tokio 1.33.0", + "tokio 1.34.0", "wasm-bindgen-futures", "wasm-timer", ] @@ -3560,9 +3605,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -3686,7 +3731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -3702,7 +3747,7 @@ dependencies = [ "curl-sys", "encoding_rs", "flume", - "futures-lite", + "futures-lite 1.13.0", "http", "log", "mime", @@ -3723,14 +3768,14 @@ version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" dependencies = [ - "async-channel", + "async-channel 1.9.0", "castaway", "crossbeam-utils", "curl", "curl-sys", "encoding_rs", "event-listener 2.5.3", - "futures-lite", + "futures-lite 1.13.0", "http", "log", "mime", @@ -3809,9 +3854,9 @@ checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -3902,9 +3947,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libgit2-sys" @@ -3964,6 +4009,28 @@ dependencies = [ "libc", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + +[[package]] +name = "libredox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "libz-sys" version = "1.1.12" @@ -4001,9 +4068,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lmdb-zero" @@ -4117,9 +4184,9 @@ dependencies = [ [[package]] name = "lyon_algorithms" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00a0349cd8f0270781bb93a824b63df6178e3b4a27794e7be3ce3763f5a44d6e" +checksum = "a3bca95f9a4955b3e4a821fbbcd5edfbd9be2a9a50bb5758173e5358bfb4c623" dependencies = [ "lyon_path", "num-traits 0.2.17", @@ -4148,9 +4215,9 @@ dependencies = [ [[package]] name = "lyon_tessellation" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2124218d5428149f9e09520b9acc024334a607e671f032d06567b61008977c" +checksum = "23bcac20d47825850fabf1e869bf7c2bbe2daefa0776c3cd2eb7cb74635f6e4a" dependencies = [ "float_next_after", "lyon_path", @@ -4757,7 +4824,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -4879,9 +4946,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.4.1", "cfg-if 1.0.0", @@ -4900,7 +4967,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -4911,9 +4978,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -4923,11 +4990,11 @@ dependencies = [ [[package]] name = "orbclient" -version = "0.3.46" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8378ac0dfbd4e7895f2d2c1f1345cab3836910baf3a300b000d04250f0c8428f" +checksum = "52f0d54bde9774d3a51dcf281a5def240c71996bc6ca05d2c847ec8b2b216166" dependencies = [ - "redox_syscall 0.3.5", + "libredox 0.0.2", ] [[package]] @@ -4960,7 +5027,7 @@ dependencies = [ "proc-macro-error", "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -4992,7 +5059,7 @@ checksum = "b7db010ec5ff3d4385e4f133916faacd9dad0f6a09394c92d825b3aed310fa0a" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5157,9 +5224,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" @@ -5230,7 +5297,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5268,7 +5335,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -5415,7 +5482,7 @@ dependencies = [ "cfg-if 1.0.0", "concurrent-queue", "pin-project-lite 0.2.13", - "rustix 0.38.21", + "rustix 0.38.25", "tracing", "windows-sys 0.48.0", ] @@ -5664,7 +5731,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -5850,12 +5917,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox 0.0.1", "thiserror", ] @@ -5945,7 +6012,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.21", + "h2 0.3.22", "http", "http-body 0.4.5", "hyper 0.14.27", @@ -5962,7 +6029,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "system-configuration", - "tokio 1.33.0", + "tokio 1.34.0", "tokio-native-tls", "tower-service", "url", @@ -6072,7 +6139,7 @@ dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", "rust-embed-utils", - "syn 2.0.38", + "syn 2.0.39", "walkdir", ] @@ -6129,14 +6196,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.21" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.10", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -6378,9 +6445,18 @@ dependencies = [ [[package]] name = "self_cell" -version = "0.10.2" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" +dependencies = [ + "self_cell 1.0.2", +] + +[[package]] +name = "self_cell" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af" +checksum = "e388332cd64eb80cd595a00941baf513caffae8dce9cfd0467fc9c66397dade6" [[package]] name = "semver" @@ -6415,9 +6491,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -6434,13 +6510,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -6610,7 +6686,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" dependencies = [ - "async-channel", + "async-channel 1.9.0", "futures-core", "futures-io", ] @@ -6626,9 +6702,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smithay-client-toolkit" @@ -6891,9 +6967,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", @@ -6983,7 +7059,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.1", "redox_syscall 0.4.1", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -7010,9 +7086,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -7056,7 +7132,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7174,9 +7250,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219" +checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece" dependencies = [ "displaydoc", ] @@ -7222,9 +7298,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.33.0" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ "backtrace", "bytes 1.5.0", @@ -7264,7 +7340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", - "tokio 1.33.0", + "tokio 1.34.0", ] [[package]] @@ -7352,7 +7428,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project-lite 0.2.13", - "tokio 1.33.0", + "tokio 1.34.0", "tracing", ] @@ -7367,14 +7443,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff9e3abce27ee2c9a37f9ad37238c1bdd4e789c84ba37df76aa4d528f5072cc" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.20.7", + "toml_edit 0.21.0", ] [[package]] @@ -7399,9 +7475,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ "indexmap 2.1.0", "serde", @@ -7436,7 +7512,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] @@ -7653,9 +7729,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -7674,7 +7750,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "serde", ] @@ -7773,9 +7849,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if 1.0.0", "serde", @@ -7785,24 +7861,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -7812,9 +7888,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote 1.0.33", "wasm-bindgen-macro-support", @@ -7822,22 +7898,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-timer" @@ -7979,9 +8055,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -8131,7 +8207,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.21", + "rustix 0.38.25", ] [[package]] @@ -8393,9 +8469,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.18" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176b6138793677221d420fd2f0aeeced263f197688b36484660da767bca2fa32" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" dependencies = [ "memchr", ] @@ -8582,29 +8658,29 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerocopy" -version = "0.7.21" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686b7e407015242119c33dab17b8f61ba6843534de936d94368856528eae4dcc" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.21" +version = "0.7.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020f3dfe25dfc38dfea49ce62d5d45ecdd7f0d8a724fa63eb36b6eba4ec76806" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -8617,7 +8693,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", - "syn 2.0.38", + "syn 2.0.39", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4e119a1..bfcfbae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ async-std = "1.6.2" isahc = { version = "0.9.6", features = ["json"] } image = "0.23.8" opener = "0.4.1" -chrono = { version = "0.4", features = ['serde'] } +chrono = { version = "0.4.11", features = ["serde"] } log = "0.4" timeago = "0.2.1" isolang = "1.0.0" diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 526d991..7f73e3a 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -78,7 +78,7 @@ isahc = { version = "1.1.0", features = ["json"] } zip = "0.5.10" glob = "0.3.0" once_cell = "1.6.0" -chrono = { version = "0.4", features = ['serde'] } +chrono = { version = "0.4.11", features = ['serde'] } log = "0.4" walkdir = "2.3" retry = "1.2" diff --git a/crates/core/src/wallet/mod.rs b/crates/core/src/wallet/mod.rs index af4a991..e329f94 100644 --- a/crates/core/src/wallet/mod.rs +++ b/crates/core/src/wallet/mod.rs @@ -23,11 +23,11 @@ pub use global::ChainTypes; pub use grin_wallet_impls::HTTPNodeClient; pub use grin_wallet_libwallet::{ InitTxArgs, RetrieveTxQueryArgs, RetrieveTxQuerySortOrder, Slate, SlateState, Slatepack, - SlatepackAddress, StatusMessage, TxLogEntry, TxLogEntryType, WalletInfo, + SlatepackAddress, StatusMessage, TxLogEntry, TxLogEntryType, WalletInfo, }; pub use grin_wallet_libwallet::contract::types::{ - ContractNewArgsAPI, ContractRevokeArgsAPI, ContractSetupArgsAPI, + ContractNewArgsAPI, ContractRevokeArgsAPI, ContractSetupArgsAPI, ProofArgs }; use crate::error::GrinWalletInterfaceError; @@ -90,7 +90,7 @@ pub type WalletInterfaceHttpNodeClient = WalletInterface< pub struct WalletInterface where - L: WalletLCProvider<'static, C, keychain::ExtKeychain> + 'static, + L: WalletLCProvider<'static, C, grin_keychain::keychain::ExtKeychain> + 'static, C: NodeClient + 'static + Clone, { pub chain_type: Option, @@ -585,7 +585,7 @@ where if let Some(o) = &w.owner_api { let slate = o.contract_sign(None, &slate, &args)?; if send_to_chain_if_ready { - if slate.state == SlateState::Standard3 || slate.state == SlateState::Standard3 { + if slate.state == SlateState::Standard3 || slate.state == SlateState::Invoice3 { o.post_tx(None, &slate, false)?; return Ok((slate.clone(), None)); } diff --git a/locale/de.json b/locale/de.json index b3e6a9f..f778159 100644 --- a/locale/de.json +++ b/locale/de.json @@ -289,6 +289,7 @@ "tx-reception-instruction": "If you agree to this transaction, press 'Sign' below, then return the resulting transaction to the sender for completion.", "tx-reception-instruction-2": "This transaction will not be completed until the sender has finalized it and posted it to the chain", "tx-s1-finalization-1": "You are finalizing an agreement to pay [AMOUNT] Grin", + "tx-i1-finalization-1": "You are finalizing an agreement to receive [AMOUNT] Grin", "tx-s1-finalization-2": "Along with a mining fee of [AMOUNT]", "tx-s1-finalization-3": "This will complete the transaction and post it to the chain, at which point it becomes irreversible.", "tx-s1-finalization-self-send": "You are self-sending [AMOUNT] Grin", diff --git a/locale/en.json b/locale/en.json index 7dd7270..4788ed7 100644 --- a/locale/en.json +++ b/locale/en.json @@ -299,6 +299,7 @@ "tx-reception-instruction": "If you agree to this transaction, press 'Sign' below, then return the resulting transaction to the sender for completion.", "tx-reception-instruction-2": "This transaction will not be completed until the sender has finalized it and posted it to the chain", "tx-s1-finalization-1": "You are finalizing an agreement to pay [AMOUNT] Grin", + "tx-i1-finalization-1": "You are finalizing an agreement to receive [AMOUNT] Grin", "tx-s1-finalization-2": "Along with a mining fee of [AMOUNT] Grin", "tx-s1-finalization-3": "This will complete the transaction and post it to the chain, at which point it becomes irreversible.", "tx-s1-finalization-self-send": "You are self-sending [AMOUNT] Grin", diff --git a/src/gui/element/wallet/operation/apply_tx.rs b/src/gui/element/wallet/operation/apply_tx.rs index 18415e4..af31d34 100644 --- a/src/gui/element/wallet/operation/apply_tx.rs +++ b/src/gui/element/wallet/operation/apply_tx.rs @@ -325,7 +325,7 @@ pub fn data_container<'a>(config: &'a Config, state: &'a StateContainer) -> Cont instruction_col = instruction_col.push(instruction_row); - if state.can_continue { + /*if state.can_continue { let decrypted_tx_label = Text::new(localized_string("pasted-slatepack-details")) .size(DEFAULT_SUB_HEADER_FONT_SIZE) .horizontal_alignment(alignment::Horizontal::Left); @@ -335,7 +335,7 @@ pub fn data_container<'a>(config: &'a Config, state: &'a StateContainer) -> Cont instruction_col = instruction_col .push(Space::new(Length::Fixed(0.0), Length::Fixed(unit_spacing))) .push(decrypted_tx_label_container) - } + }*/ let mut slatepack_area = Column::new(); if state.can_continue { diff --git a/src/gui/element/wallet/operation/apply_tx_confirm.rs b/src/gui/element/wallet/operation/apply_tx_confirm.rs index ac6f313..3c91509 100644 --- a/src/gui/element/wallet/operation/apply_tx_confirm.rs +++ b/src/gui/element/wallet/operation/apply_tx_confirm.rs @@ -4,8 +4,8 @@ use async_std::prelude::FutureExt; use grin_gui_core::{ config::{Config, TxMethod}, wallet::{ - ContractNewArgsAPI, ContractSetupArgsAPI, Slate, SlateState, Slatepack, TxLogEntry, - TxLogEntryType, + ContractNewArgsAPI, ContractSetupArgsAPI, ProofArgs, Slate, SlateState, Slatepack, + TxLogEntry, TxLogEntryType, }, }; use grin_gui_widgets::widget::header; @@ -169,15 +169,16 @@ pub fn handle_message<'a>( } } } else { - let sp_sending_address = match &slatepack.sender { - None => "None".to_string(), - Some(s) => s.to_string(), + let (sp_sending_address, sender_pub_key) = match &slatepack.sender { + None => ("None".to_string(), None), + Some(s) => (s.to_string(), Some(s.pub_key)), }; - // Can we just dumbly do opposite here? let net_change = match slate.state { - SlateState::Standard1 | SlateState::Invoice1 => Some(-(slate.amount as i64)), - SlateState::Standard2 | SlateState::Invoice2 => None, + SlateState::Standard1 => Some(slate.amount as i64), + SlateState::Standard2 => None, + SlateState::Invoice1 => Some(-(slate.amount as i64)), + SlateState::Invoice2 => None, _ => { log::error!("Slate state not yet supported"); return Ok(Command::none()); @@ -187,15 +188,30 @@ pub fn handle_message<'a>( // Should be a simplified context flow here, where we can be recipient or sender! let mut args = ContractSetupArgsAPI { net_change, + proof_args: ProofArgs { + sender_address: sender_pub_key, + ..Default::default() + }, ..Default::default() }; state.is_signing = true; + if slate.state == SlateState::Invoice1 { + args = ContractSetupArgsAPI { + net_change, + ..Default::default() + }; + } + + if slate.state == SlateState::Invoice2 { + args = ContractSetupArgsAPI { + ..Default::default() + }; + }; + if state.is_self_send { debug!("SLATE STATE SELF_SEND: {}", slate.state); - let fut = move || { - WalletInterface::post_tx(w, out_slate) - }; + let fut = move || WalletInterface::post_tx(w, out_slate); return Ok(Command::perform(fut(), |r| { match r.context("Failed to Progress Transaction") { Ok((slate, enc_slate)) => { @@ -220,6 +236,7 @@ pub fn handle_message<'a>( })); } else { let fut = move || { + debug!("SIGN ARGS: {:?}", args); WalletInterface::contract_sign(w, out_slate, args, sp_sending_address, true) }; @@ -344,11 +361,11 @@ pub fn data_container<'a>(config: &'a Config, state: &'a StateContainer) -> Cont SlateState::Standard2 => { let mut fee = String::default(); other_wallet_label = localized_string("tx-recipient-name"); - reception_instruction_2 = - parse_info_strings(&localized_string("tx-s1-finalization-3"), &fee); if let Some(tx) = tx_log_entry { (amount, fee) = parse_abs_tx_amount_fee(tx, !state.is_self_send); } + reception_instruction_2 = + parse_info_strings(&localized_string("tx-s1-finalization-3"), &fee); reception_instruction_1 = parse_info_strings(&localized_string("tx-s1-finalization-2"), &fee); let amt_stmt = parse_info_strings(&localized_string("tx-s1-finalization-1"), &amount); @@ -361,27 +378,46 @@ pub fn data_container<'a>(config: &'a Config, state: &'a StateContainer) -> Cont if config.tx_method == TxMethod::Contracts { state_text = match slate.state { SlateState::Standard1 => { - other_wallet_label = localized_string("tx-recipient-name"); - parse_info_strings(&localized_string("tx-sending"), &amount) + other_wallet_label = localized_string("tx-sender-name"); + parse_info_strings(&localized_string("tx-reception"), &amount) } SlateState::Standard2 => { let mut fee = String::default(); other_wallet_label = localized_string("tx-sender-name"); - reception_instruction_2 = - parse_info_strings(&localized_string("tx-s1-finalization-3"), &fee); if let Some(tx) = tx_log_entry { (amount, fee) = parse_abs_tx_amount_fee(tx, !state.is_self_send); } + reception_instruction_2 = + parse_info_strings(&localized_string("tx-s1-finalization-3"), &fee); reception_instruction_1 = parse_info_strings(&localized_string("tx-s1-finalization-2"), &fee); let amt_stmt = match state.is_self_send { - true => parse_info_strings(&localized_string("tx-s1-finalization-self-send"), &amount), + true => parse_info_strings( + &localized_string("tx-s1-finalization-self-send"), + &amount, + ), false => parse_info_strings(&localized_string("tx-s1-finalization-1"), &amount), }; amt_stmt } SlateState::Standard3 => "This transaction is finalised - Standard Workflow".to_owned(), + SlateState::Invoice1 => { + other_wallet_label = localized_string("tx-recipient-name"); + parse_info_strings(&localized_string("tx-sending"), &amount) + } + SlateState::Invoice2 => { + let mut fee = String::default(); + other_wallet_label = localized_string("tx-sender-name"); + if let Some(tx) = tx_log_entry { + (amount, fee) = parse_abs_tx_amount_fee(tx, false); + } + reception_instruction_2 = localized_string("tx-s1-finalization-3"); + reception_instruction_1 = "".to_owned(); + //parse_info_strings(&localized_string("tx-s1-finalization-2"), &fee); + + parse_info_strings(&localized_string("tx-i1-finalization-1"), &amount) + } _ => state_text, }; diff --git a/src/gui/element/wallet/operation/create_tx_contracts.rs b/src/gui/element/wallet/operation/create_tx_contracts.rs index da495d0..32660c8 100644 --- a/src/gui/element/wallet/operation/create_tx_contracts.rs +++ b/src/gui/element/wallet/operation/create_tx_contracts.rs @@ -4,7 +4,7 @@ use async_std::prelude::FutureExt; use grin_gui_core::{ config::Config, error::GrinWalletInterfaceError, - wallet::{ContractNewArgsAPI, ContractSetupArgsAPI, Slatepack, TxLogEntry, TxLogEntryType}, + wallet::{ContractNewArgsAPI, ContractSetupArgsAPI, Slatepack, TxLogEntry, TxLogEntryType, SlatepackAddress}, }; use grin_gui_widgets::widget::header; use iced_aw::Card; @@ -189,7 +189,16 @@ pub fn handle_message<'a>( ..Default::default() }; - if state.contribution_choice == ContributionChoice::Credit || state.is_self_send { + if state.contribution_choice == ContributionChoice::Credit { + debug!("CREDITOR ADDRESS: {}", state.recipient_address_value); + let res:Result = state.recipient_address_value.as_str().try_into(); + if let Ok(creditor_address) = res { + args.setup_args.proof_args.sender_address = Some(creditor_address.pub_key); + debug!("CREDITOR ADDRESS: {:?}", args.setup_args.proof_args.sender_address); + } + } + + if state.is_self_send || state.contribution_choice == ContributionChoice::Debit { if let Some(a) = &grin_gui.wallet_state.operation_state.home_state.address { args.setup_args.proof_args.sender_address = Some(a.pub_key); } @@ -226,6 +235,7 @@ pub fn handle_message<'a>( return Ok(Command::perform(fut(), |r| match r { Ok((enc_slate, unenc_slate)) => Message::Interaction( + Interaction::WalletOperationCreateTxContractsViewInteraction( LocalViewInteraction::TxCreatedOk(enc_slate, unenc_slate), ), @@ -248,7 +258,7 @@ pub fn handle_message<'a>( } } LocalViewInteraction::TxCreatedOk(unencrypted_slate, encrypted_slate) => { - log::debug!("{:?}", encrypted_slate); + log::debug!("{}", unencrypted_slate); grin_gui .wallet_state .operation_state diff --git a/src/gui/element/wallet/setup/wallet_setup.rs b/src/gui/element/wallet/setup/wallet_setup.rs index 8b88623..d80c7c6 100644 --- a/src/gui/element/wallet/setup/wallet_setup.rs +++ b/src/gui/element/wallet/setup/wallet_setup.rs @@ -292,22 +292,20 @@ pub fn data_container<'a>( let header_row = Row::new().push(title_container); let header_container = Container::new(header_row).padding(iced::Padding::from([ - 0, // top - 0, // right + 0, // top + 0, // right DEFAULT_PADDING as u16, // bottom - 0, // left + 0, // left ])); let password_column = { let password_input = TextInput::new( &localized_string("password")[..], &state.password_state.input_value, - /*|s| { - Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::PasswordInput( - s, - )) - },*/ ) + .on_input(|s| { + Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::PasswordInput(s)) + }) .on_submit(Interaction::WalletSetupWalletViewInteraction( LocalViewInteraction::PasswordInputEnterPressed, )) @@ -322,12 +320,12 @@ pub fn data_container<'a>( let repeat_password_input = TextInput::new( &localized_string("password-repeat")[..], &state.password_state.repeat_input_value, - /*|s| { - Interaction::WalletSetupWalletViewInteraction( - LocalViewInteraction::PasswordRepeatInput(s), - ) - },*/ ) + .on_input(|s| { + Interaction::WalletSetupWalletViewInteraction( + LocalViewInteraction::PasswordRepeatInput(s), + ) + }) .on_submit(Interaction::WalletSetupWalletViewInteraction( LocalViewInteraction::PasswordRepeatInputEnterPressed, )) @@ -369,8 +367,8 @@ pub fn data_container<'a>( let description = Text::new(localized_string("setup-grin-wallet-enter-password")) .size(DEFAULT_FONT_SIZE) .horizontal_alignment(alignment::Horizontal::Center); - let description_container = Container::new(description) - .style(grin_gui_core::theme::ContainerStyle::NormalBackground); + let description_container = + Container::new(description).style(grin_gui_core::theme::ContainerStyle::NormalBackground); let mut restore_from_seed_column = { let checkbox = Checkbox::new( @@ -415,9 +413,12 @@ pub fn data_container<'a>( }; // ** start hideable restore from seed section - let seed_input: Element = TextInput::new("seed", &state.seed_input_value/*, |s| { - Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::SeedInput(s)) - }*/) + let seed_input: Element = TextInput::new( + "seed", + &state.seed_input_value, /*, |s| { + Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::SeedInput(s)) + }*/ + ) .size(DEFAULT_FONT_SIZE) .padding(6) .width(Length::Fixed(200.0)) @@ -446,8 +447,10 @@ pub fn data_container<'a>( let display_name_input = TextInput::new( default_display_name, &state.advanced_options_state.display_name_value, - /*|s| Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::DisplayName(s)),*/ ) + .on_input(|s| { + Interaction::WalletSetupWalletViewInteraction(LocalViewInteraction::DisplayName(s)) + }) .size(DEFAULT_FONT_SIZE) .padding(6) .width(Length::Fixed(200.0)) @@ -485,7 +488,10 @@ pub fn data_container<'a>( let folder_select_row = Row::new() .push(folder_select_button.map(Message::Interaction)) - .push(Space::new(Length::Fixed(DEFAULT_PADDING), Length::Fixed(0.0))) + .push(Space::new( + Length::Fixed(DEFAULT_PADDING), + Length::Fixed(0.0), + )) .push(current_tld_column); let display_name_input: Element = display_name_input.into();