Skip to content

Commit

Permalink
update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Coats committed Nov 9, 2023
1 parent b449f0b commit 5b7cdb7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

24 changes: 12 additions & 12 deletions src/model/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use core::borrow::Borrow;
use iota_sdk::types::block::{
address::{
self as iota, AddressCapabilities, Ed25519Address, ImplicitAccountCreationAddress, MultiAddress,
RestrictedAddress,
RestrictedAddress, WeightedAddress,
},
output::{AccountId, AnchorId, NftId},
};
Expand Down Expand Up @@ -134,17 +134,17 @@ impl From<AddressDto> for iota::Address {
)),
AddressDto::Multi(a) => Self::Multi(
MultiAddress::new(
a.addresses.into_iter().map(|_a| {
todo!()
// WeightedAddress::new(
// match address {
// CoreAddressDto::Ed25519(a) => Self::Ed25519(a),
// CoreAddressDto::Account(a) => Self::Account(a.into()),
// CoreAddressDto::Nft(a) => Self::Nft(a.into()),
// CoreAddressDto::Anchor(a) => Self::Anchor(a.into()),
// },
// a.weight,
// )
a.addresses.into_iter().map(|address| {
WeightedAddress::new(
match address.address {
CoreAddressDto::Ed25519(a) => Self::Ed25519(a),
CoreAddressDto::Account(a) => Self::Account(a.into()),
CoreAddressDto::Nft(a) => Self::Nft(a.into()),
CoreAddressDto::Anchor(a) => Self::Anchor(a.into()),
},
address.weight,
)
.unwrap()
}),
a.threshold,
)
Expand Down

0 comments on commit 5b7cdb7

Please sign in to comment.