Skip to content

Commit 884d1e2

Browse files
committed
make update_nft work with hd wallets using the enabled address
1 parent 9716a52 commit 884d1e2

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

mm2src/coins/eth.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -6634,14 +6634,7 @@ pub async fn get_eth_address(
66346634

66356635
let (_, derivation_method) =
66366636
build_address_and_priv_key_policy(ctx, ticker, conf, priv_key_policy, path_to_address, None).await?;
6637-
let my_address = match derivation_method {
6638-
EthDerivationMethod::SingleAddress(my_address) => my_address,
6639-
EthDerivationMethod::HDWallet(_) => {
6640-
return Err(MmError::new(GetEthAddressError::UnexpectedDerivationMethod(
6641-
UnexpectedDerivationMethod::UnsupportedError("HDWallet is not supported for NFT yet!".to_owned()),
6642-
)));
6643-
},
6644-
};
6637+
let my_address = derivation_method.single_addr_or_err().await?;
66456638

66466639
Ok(MyWalletAddress {
66476640
coin: ticker.to_owned(),

mm2src/coins/lp_coins.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4997,7 +4997,7 @@ pub async fn delegations_info(ctx: MmArc, req: DelegationsInfo) -> Result<Json,
49974997
DelegationsInfoDetails::Qtum => {
49984998
let MmCoinEnum::QtumCoin(qtum) = coin else {
49994999
return MmError::err(StakingInfoError::InvalidPayload {
5000-
reason: format!("{} is not a Qtum coin", req.coin)
5000+
reason: format!("{} is not a Qtum coin", req.coin),
50015001
});
50025002
};
50035003

@@ -5048,7 +5048,7 @@ pub async fn claim_staking_rewards(ctx: MmArc, req: ClaimStakingRewardsRequest)
50485048

50495049
let MmCoinEnum::Tendermint(tendermint) = coin else {
50505050
return MmError::err(DelegationError::InvalidPayload {
5051-
reason: format!("{} is not a Cosmos coin", req.coin)
5051+
reason: format!("{} is not a Cosmos coin", req.coin),
50525052
});
50535053
};
50545054

0 commit comments

Comments
 (0)