From d3189be4a69f7017b102120553f0d7eb977458e3 Mon Sep 17 00:00:00 2001 From: hal3e Date: Mon, 24 Oct 2022 12:24:27 +0200 Subject: [PATCH] fix merge error --- packages/fuels-core/src/code_gen/abigen.rs | 4 ++-- packages/fuels/tests/contracts.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/fuels-core/src/code_gen/abigen.rs b/packages/fuels-core/src/code_gen/abigen.rs index 6bf64130f1..6e0112de2f 100644 --- a/packages/fuels-core/src/code_gen/abigen.rs +++ b/packages/fuels-core/src/code_gen/abigen.rs @@ -111,7 +111,7 @@ impl Abigen { use fuels::core::code_gen::function_selector::resolve_fn_selector; use fuels::core::types::*; use fuels::signers::WalletUnlocked; - use fuels::tx::{ContractId, Address, Receipt}; + use fuels::tx::{ContractId, Address, Receipt, AssetId}; use fuels::types::bech32::Bech32ContractId; use fuels::types::ResolvedLog; use fuels::types::errors::Error as SDKError; @@ -147,7 +147,7 @@ impl Abigen { Ok(Self { contract_id: self.contract_id.clone(), wallet: wallet, logs_lookup: self.logs_lookup.clone() }) } - pub async fn get_balances(&self) -> Result, SDKError> { + pub async fn get_balances(&self) -> Result, SDKError> { self.wallet.get_provider()?.get_contract_balances(&self.contract_id).await.map_err(Into::into) } diff --git a/packages/fuels/tests/contracts.rs b/packages/fuels/tests/contracts.rs index 7977507b36..ebb4c756a4 100644 --- a/packages/fuels/tests/contracts.rs +++ b/packages/fuels/tests/contracts.rs @@ -612,8 +612,7 @@ async fn test_contract_instance_get_balances() -> Result<(), Error> { let contract_balances = contract_instance.get_balances().await?; assert_eq!(contract_balances.len(), 1); - let random_asset_id_key = format!("{:#x}", random_asset_id); - let random_asset_balance = contract_balances.get(&random_asset_id_key).unwrap(); + let random_asset_balance = contract_balances.get(&random_asset_id).unwrap(); assert_eq!(*random_asset_balance, amount); Ok(())