Skip to content

Commit

Permalink
update to match the refactored interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Mar 27, 2024
1 parent ee58df2 commit d852d82
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ serde = ["serde_crate", "serde_with", "serde_yaml", "bp-std/serde", "bp-wallet/s
features = ["all"]

[patch.crates-io]
rgb-std = { git = "https://github.com/RGB-WG/rgb-std", branch = "dups" }
rgb-std = { git = "https://github.com/RGB-WG/rgb-std", branch = "iface" }
16 changes: 0 additions & 16 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,14 +552,6 @@ impl Exec for RgbArgs {
let name = name
.as_str()
.expect("invalid YAML: global name must be a string");
let name = iface
.genesis
.global
.iter()
.find(|(n, _)| n.as_str() == name)
.and_then(|(_, spec)| spec.name.as_ref())
.map(FieldName::as_str)
.unwrap_or(name);
let state_type = iface_impl
.global_state
.iter()
Expand Down Expand Up @@ -596,14 +588,6 @@ impl Exec for RgbArgs {
let name = name
.as_str()
.expect("invalid YAML: assignments name must be a string");
let name = iface
.genesis
.assignments
.iter()
.find(|(n, _)| n.as_str() == name)
.and_then(|(_, spec)| spec.name.as_ref())
.map(FieldName::as_str)
.unwrap_or(name);
let state_type = iface_impl
.assignments
.iter()
Expand Down
9 changes: 4 additions & 5 deletions src/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,10 @@ impl Runtime {
.assignment
.as_ref()
.or_else(|| {
iface.transitions.get(operation).and_then(|t| {
t.default_assignment
.as_ref()
.and_then(|f| t.assignments.get(f).and_then(|arg| (&arg.name).into()))
})
iface
.transitions
.get(operation)
.and_then(|t| t.default_assignment.as_ref())
})
.cloned()
.ok_or(CompositionError::NoAssignment)?;
Expand Down

0 comments on commit d852d82

Please sign in to comment.