Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Commit

Permalink
v0.1.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Sep 18, 2020
1 parent a783b42 commit 6077490
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ electrum-client = { git = "https://github.com/LNP-BP/rust-electrum-client.git",

[dependencies.lnpbp]
git = "https://github.com/LNP-BP/rust-lnpbp"
branch = "master"
tag = "v0.1.0-beta.4"
features = ["all"]

[dependencies.lnpbp_derive]
git = "https://github.com/LNP-BP/rust-lnpbp"
branch = "master"
tag = "v0.1.0-beta.4"

[target.'cfg(target_os="android")'.dependencies.zmq]
version = "~0.9"
Expand All @@ -67,6 +67,6 @@ identities = []
members = ["ffi"]

[patch.crates-io]
torut = { git = "https://github.com/afilini/torut", branch = "vendored-openssl-android" }
torut = { git = "https://github.com/LNP-BP/torut", branch = "vendored-openssl-android" }
# Remove this once https://github.com/jean-airoldie/zeromq-src-rs/pull/15 got merged
zeromq-src = { git = "https://github.com/LNP-BP/zeromq-src-rs", branch = "fix/cmake" }
2 changes: 1 addition & 1 deletion ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use rgb::lnpbp::bitcoin::OutPoint;

use rgb::lnpbp::bp;
use rgb::lnpbp::lnp::transport::zmq::{SocketLocator, UrlError};
use rgb::lnpbp::rgb::{seal, Amount};
use rgb::lnpbp::rgb::Amount;

use rgb::fungible::{Invoice, IssueStructure, Outcoins};
use rgb::i9n::*;
Expand Down
4 changes: 0 additions & 4 deletions src/cli/fungible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ impl Command {
}

fn exec_validate(&self, mut runtime: Runtime, filename: PathBuf) -> Result<(), Error> {
use lnpbp::strict_encoding::strict_encode;

info!("Validating asset transfer...");

debug!("Reading consignment from file {:?}", &filename);
Expand Down Expand Up @@ -285,8 +283,6 @@ impl Command {
outpoint: OutPoint,
blinding_factor: u64,
) -> Result<(), Error> {
use lnpbp::strict_encoding::strict_encode;

info!("Accepting asset transfer...");

debug!("Reading consignment from file {:?}", &filename);
Expand Down
7 changes: 6 additions & 1 deletion src/contracts/fungible/data/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ impl Asset {
amount,
};
let allocations = self.known_allocations.entry(seal).or_insert(vec![]);
allocations.remove_item(&old_allocation).is_some()
if let Some(index) = allocations.iter().position(|a| *a == old_allocation) {
allocations.remove(index);
true
} else {
false
}
}
}

Expand Down

0 comments on commit 6077490

Please sign in to comment.