From 786975e0a83b53d7053f73eef78dc15255c5055e Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 29 Jun 2022 16:12:44 +0200 Subject: [PATCH 1/3] Fix melting Native Token with foundry metadata --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bcd0705..48ceff6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1361,7 +1361,7 @@ dependencies = [ [[package]] name = "iota-wallet" version = "0.2.0" -source = "git+https://github.com/iotaledger/wallet.rs?rev=1e9ae9e05b1a992202e627fa91bc748466e6b53e#1e9ae9e05b1a992202e627fa91bc748466e6b53e" +source = "git+https://github.com/iotaledger/wallet.rs?rev=ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78#ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78" dependencies = [ "async-trait", "backtrace", diff --git a/Cargo.toml b/Cargo.toml index 89d8448..bf97b2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ clap = { version = "3.2.5", default-features = false, features = [ "derive", "st dialoguer = { version = "0.10.1", default-features = false, features = [ "password" ] } fern-logger = { version = "0.5.0", default-features = false } iota-crypto = { version = "0.12.1", default-features = false, features = [ "std", "random", "sha", "pbkdf", "hmac", "bip39", "bip39-en", "chacha", "blake2b", "slip10" ] } -iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", rev = "1e9ae9e05b1a992202e627fa91bc748466e6b53e", default-features = false, features = [ "storage", "stronghold" ] } +iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", rev = "ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78", default-features = false, features = [ "storage", "stronghold" ] } log = { version = "0.4.17", default-features = false } prefix-hex = { version = "0.4.0", default-features = false, features = [ "std" ] } thiserror = { version = "1.0.31", default-features = false } From 25864b1e8b2220d7d5ff641baeda62929eb6dde2 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 29 Jun 2022 16:30:54 +0200 Subject: [PATCH 2/3] Add with_coin_type --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/account_manager.rs | 3 +++ src/command/account_manager.rs | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48ceff6..6b821c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1361,7 +1361,7 @@ dependencies = [ [[package]] name = "iota-wallet" version = "0.2.0" -source = "git+https://github.com/iotaledger/wallet.rs?rev=ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78#ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78" +source = "git+https://github.com/iotaledger/wallet.rs?rev=75b1f9e9dd150d2547d3fe61b2af60310ab6473d#75b1f9e9dd150d2547d3fe61b2af60310ab6473d" dependencies = [ "async-trait", "backtrace", diff --git a/Cargo.toml b/Cargo.toml index bf97b2d..c90e063 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ clap = { version = "3.2.5", default-features = false, features = [ "derive", "st dialoguer = { version = "0.10.1", default-features = false, features = [ "password" ] } fern-logger = { version = "0.5.0", default-features = false } iota-crypto = { version = "0.12.1", default-features = false, features = [ "std", "random", "sha", "pbkdf", "hmac", "bip39", "bip39-en", "chacha", "blake2b", "slip10" ] } -iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", rev = "ef85e8a50c5eb33c8f2d0561d979b7f58b9b5e78", default-features = false, features = [ "storage", "stronghold" ] } +iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", rev = "75b1f9e9dd150d2547d3fe61b2af60310ab6473d", default-features = false, features = [ "storage", "stronghold" ] } log = { version = "0.4.17", default-features = false } prefix-hex = { version = "0.4.0", default-features = false, features = [ "std" ] } thiserror = { version = "1.0.31", default-features = false } diff --git a/src/account_manager.rs b/src/account_manager.rs index e9dd4f9..4de3383 100644 --- a/src/account_manager.rs +++ b/src/account_manager.rs @@ -5,6 +5,7 @@ use std::env::var_os; use iota_wallet::{ account_manager::AccountManager, + iota_client::constants::SHIMMER_COIN_TYPE, secret::{stronghold::StrongholdSecretManager, SecretManager}, }; @@ -37,6 +38,7 @@ pub async fn new_account_manager(cli: AccountManagerCli) -> Result<(AccountManag let account_manager = AccountManager::builder() .with_secret_manager(secret_manager) .with_storage_path(&storage_path) + .with_coin_type(SHIMMER_COIN_TYPE) .finish() .await?; let mut account = None; @@ -56,6 +58,7 @@ pub async fn new_account_manager(cli: AccountManagerCli) -> Result<(AccountManag AccountManager::builder() .with_secret_manager(secret_manager) .with_storage_path(&storage_path) + .with_coin_type(SHIMMER_COIN_TYPE) .finish() .await?, None, diff --git a/src/command/account_manager.rs b/src/command/account_manager.rs index 2a15319..717bee1 100644 --- a/src/command/account_manager.rs +++ b/src/command/account_manager.rs @@ -6,7 +6,7 @@ use std::{fs::File, io::prelude::*}; use clap::{Args, Parser, Subcommand}; use iota_wallet::{ account_manager::AccountManager, - iota_client::{secret::SecretManager, utils::generate_mnemonic}, + iota_client::{constants::SHIMMER_COIN_TYPE, secret::SecretManager, utils::generate_mnemonic}, ClientOptions, }; use log::LevelFilter; @@ -57,6 +57,7 @@ pub async fn init_command( .with_node_sync_disabled(), ) .with_storage_path(&storage_path) + .with_coin_type(SHIMMER_COIN_TYPE) .finish() .await?; From 73fc78beef2a4a30983c865a5a70f9606bf1bb84 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Wed, 29 Jun 2022 16:50:43 +0200 Subject: [PATCH 3/3] Remove 2 with_coin_type --- src/account_manager.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/account_manager.rs b/src/account_manager.rs index 4de3383..e9dd4f9 100644 --- a/src/account_manager.rs +++ b/src/account_manager.rs @@ -5,7 +5,6 @@ use std::env::var_os; use iota_wallet::{ account_manager::AccountManager, - iota_client::constants::SHIMMER_COIN_TYPE, secret::{stronghold::StrongholdSecretManager, SecretManager}, }; @@ -38,7 +37,6 @@ pub async fn new_account_manager(cli: AccountManagerCli) -> Result<(AccountManag let account_manager = AccountManager::builder() .with_secret_manager(secret_manager) .with_storage_path(&storage_path) - .with_coin_type(SHIMMER_COIN_TYPE) .finish() .await?; let mut account = None; @@ -58,7 +56,6 @@ pub async fn new_account_manager(cli: AccountManagerCli) -> Result<(AccountManag AccountManager::builder() .with_secret_manager(secret_manager) .with_storage_path(&storage_path) - .with_coin_type(SHIMMER_COIN_TYPE) .finish() .await?, None,