Skip to content

Commit

Permalink
Merge pull request #66 from yeastplume/contracts_update
Browse files Browse the repository at this point in the history
[WIP] Update all dependencies
  • Loading branch information
yeastplume committed Aug 17, 2023
2 parents fe59c68 + dc1836d commit b7deafa
Show file tree
Hide file tree
Showing 48 changed files with 2,322 additions and 1,880 deletions.
3,201 changes: 1,811 additions & 1,390 deletions Cargo.lock

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ version = "0.1.0"
edition = "2021"

[features]
default = ["opengl"]
wgpu = [ "iced/wgpu", "iced/default_system_font"]
opengl = [ "iced/glow"]
default = ["wgpu"]
wgpu = [ "iced_renderer/wgpu" ]
no-self-update = ["grin-gui-core/no-self-update"]
debug = ["iced/debug"]

[dependencies]
grin-gui-core = { version = "0.1.0", path = "crates/core", features=['gui'] }
grin-gui-core = { version = "0.1.0", path = "crates/core", features = ["wgpu"]}
grin-gui-widgets = { version = "0.1.0", path = "crates/widgets" }

iced = { version = "0.7.0", features = ["canvas", "tokio", "default_system_font"] }
iced_futures = { version = "0.5", features = ["async-std"] }
iced_style = {version = "0.6.0"}
iced_native = { version = "0.8.0" }
iced_aw = { git = "https://github.com/iced-rs/iced_aw.git" }
plotters-iced = "0.6.0"
iced = { version = "0.10", features = ["canvas", "tokio"] }
iced_futures = { version = "0.7", features = ["async-std"] }
iced_style = {version = "0.9"}
iced_renderer = { version = "0.1" }
iced_core = { version = "0.10" }
iced_aw = { version = "0.6", default-features = false, features = ["card", "modal"]}

plotters-iced = "0.9.0"
plotters="0.3"
plotters-backend = "0.3"
rand = "0.8.3"
Expand Down
49 changes: 22 additions & 27 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ edition = "2018"
build = "src/build/build.rs"

[features]
default = ["opengl", "gui"]
gui = ['iced_native']
default = ["wgpu"]
no-self-update = []
wgpu = ["iced_wgpu"]
opengl = ["iced_glow"]
wgpu = ["iced_renderer/wgpu"]

[build-dependencies]
built = { version = "0.4", features = ["git2"] }
Expand All @@ -23,21 +21,21 @@ built = { version = "0.4", features = ["git2"] }

############ Release ################
### Node
grin_config = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_core = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_util = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_servers = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_keychain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_chain = { git = "https://github.com/mimblewimble/grin", branch = "master" }
grin_config = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }
grin_core = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }
grin_util = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }
grin_servers = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }
grin_keychain = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }
grin_chain = { git = "https://github.com/mimblewimble/grin", tag = "v5.2.0-beta.3" }

### Wallet
grin_wallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_config = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_controller = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "master" }
grin_wallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_config = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_util = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_controller = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_api = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_impls = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin_wallet_libwallet = { git = "https://github.com/mimblewimble/grin-wallet", branch = "contracts" }
grin-gui-widgets = { path = "../widgets" }


Expand Down Expand Up @@ -92,16 +90,13 @@ log4rs = { version = "0.12", features = [
backtrace = "0.3"
lazy_static = "1"

iced = { version = "0.7.0", default-features = false, features = ["default"] }
iced_futures = { version = "0.5", features = ["async-std"] }
iced_core = { version = "0.7.0" }
iced_style = "0.6.0"
iced_graphics = { version = "0.6.0" }
iced_native = { version = "0.8.0", optional = true }
iced_aw = { git = "https://github.com/iced-rs/iced_aw.git" }

iced_wgpu = { version = "0.8.0", optional = true }
iced_glow = { version = "0.6.0", optional = true }
iced = { version = "0.10", features = ["advanced", "tokio"] }
iced_futures = { version = "0.7", features = ["async-std"] }
iced_core = { version = "0.10" }
iced_style = "0.9"
iced_graphics = { version = "0.9" }
iced_renderer = { version = "0.1", features = ["wgpu"] }
iced_aw = { version = "0.6", default-features = false, features = ["card", "modal"]}

[dev-dependencies]
tempfile = "3.2.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/core/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use std::sync::Mutex;

pub mod backup;
mod save;
#[cfg(feature = "gui")]
#[cfg(feature = "default")]
mod theme;

pub use save::PersistentData;
#[cfg(feature = "gui")]
#[cfg(feature = "default")]
pub use theme::{import_theme, load_user_themes};

pub static CONFIG_DIR: Lazy<Mutex<PathBuf>> = Lazy::new(|| {
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod error;
pub mod fs;
pub mod theme;
pub mod network;
#[cfg(feature = "gui")]
#[cfg(feature = "wgpu")]
pub mod utility;

#[macro_use]
Expand Down
10 changes: 5 additions & 5 deletions crates/core/src/node/subscriber.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use iced_futures::{
self,
futures::{channel::mpsc, stream::StreamExt},
futures::{channel::mpsc, stream::StreamExt}, subscription,
};
use iced_core::Hasher;
use std::hash::Hash;

pub use grin_servers::ServerStats;
Expand Down Expand Up @@ -30,22 +31,21 @@ pub struct NodeSubscriber<I> {
id: I,
}

impl<H, I, T> iced_native::subscription::Recipe<H, I> for NodeSubscriber<T>
impl<T> iced_futures::subscription::Recipe for NodeSubscriber<T>
where
T: 'static + Hash + Copy + Send,
H: std::hash::Hasher,
{
type Output = (T, UIMessage, Option<mpsc::Sender<UIMessage>>);

fn hash(&self, state: &mut H) {
fn hash(&self, state: &mut Hasher) {
struct Marker;
std::any::TypeId::of::<Marker>().hash(state);
self.id.hash(state);
}

fn stream(
self: Box<Self>,
_input: futures::stream::BoxStream<'static, I>,
_input: subscription::EventStream,
) -> futures::stream::BoxStream<'static, Self::Output> {
let id = self.id;
Box::pin(futures::stream::unfold(
Expand Down
14 changes: 7 additions & 7 deletions crates/core/src/theme/button.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use iced::widget::button;
use iced::{Background, Color};
use iced::{Color, Background};

use super::Theme;

Expand Down Expand Up @@ -27,40 +27,40 @@ impl button::StyleSheet for Theme {
..self.palette.normal.primary
},
border_width: 1.0,
border_radius: 2.0,
border_radius: 2.0.into(),
text_color: self.palette.bright.primary,
..button::Appearance::default()
},
ButtonStyle::Primary => button::Appearance {
text_color: self.palette.bright.primary,
border_radius: 2.0,
border_radius: 2.0.into(),
..Default::default()
},
ButtonStyle::Selected => button::Appearance {
background: Some(Background::Color(self.palette.normal.primary)),
text_color: self.palette.bright.primary,
border_radius: 2.0,
border_radius: 2.0.into(),
..button::Appearance::default()
},
ButtonStyle::NormalText => button::Appearance {
text_color: self.palette.normal.surface,
border_radius: 2.0,
border_radius: 2.0.into(),
..button::Appearance::default()
},
ButtonStyle::SelectedColumn => button::Appearance {
background: Some(Background::Color(self.palette.base.background)),
text_color: Color {
..self.palette.bright.primary
},
border_radius: 2.0,
border_radius: 2.0.into(),
..button::Appearance::default()
},
ButtonStyle::ColumnHeader => button::Appearance {
background: Some(Background::Color(self.palette.base.background)),
text_color: Color {
..self.palette.bright.surface
},
border_radius: 2.0,
border_radius: 2.0.into(),
..button::Appearance::default()
},
}
Expand Down
8 changes: 4 additions & 4 deletions crates/core/src/theme/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ impl checkbox::StyleSheet for Theme {
match style {
CheckboxStyle::Normal => checkbox::Appearance {
background: Background::Color(self.palette.base.background),
checkmark_color: self.palette.bright.primary,
border_radius: 2.0,
icon_color: self.palette.bright.primary,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: self.palette.normal.primary,
text_color: Some(self.palette.normal.surface),
Expand All @@ -30,8 +30,8 @@ impl checkbox::StyleSheet for Theme {
match style {
CheckboxStyle::Normal => checkbox::Appearance {
background: Background::Color(self.palette.base.foreground),
checkmark_color: self.palette.bright.primary,
border_radius: 2.0,
icon_color: self.palette.bright.primary,
border_radius: 2.0.into(),
border_width: 2.0,
border_color: self.palette.bright.primary,
text_color: Some(self.palette.normal.surface),
Expand Down
6 changes: 3 additions & 3 deletions crates/core/src/theme/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl container::StyleSheet for Theme {
..container::Appearance::default()
},
ContainerStyle::Segmented => container::Appearance {
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: Color {
a: 0.5,
Expand All @@ -71,14 +71,14 @@ impl container::StyleSheet for Theme {
ContainerStyle::PanelForeground => container::Appearance {
background: Some(Background::Color(self.palette.base.foreground)),
text_color: Some(self.palette.bright.primary),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 0.0,
border_color: Color::TRANSPARENT,
},
ContainerStyle::PanelBordered => container::Appearance {
background: Some(Background::Color(Color::TRANSPARENT)),
text_color: Some(self.palette.bright.primary),
border_radius: 2.0,
border_radius: 2.0.into(),
border_width: 1.0,
border_color: Color {
a: 0.5,
Expand Down
Loading

0 comments on commit b7deafa

Please sign in to comment.