From fa448bb16dcb9dce1b77ed83ebd696c6c05e9954 Mon Sep 17 00:00:00 2001 From: chungquantin <56880684+chungquantin@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:48:03 +0700 Subject: [PATCH 1/2] fix: invalid imported crates & crate visibility --- pop-api/src/v0/assets/fungibles.rs | 12 +++++------- runtime/devnet/src/config/mod.rs | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pop-api/src/v0/assets/fungibles.rs b/pop-api/src/v0/assets/fungibles.rs index c881f8234..435e17899 100644 --- a/pop-api/src/v0/assets/fungibles.rs +++ b/pop-api/src/v0/assets/fungibles.rs @@ -11,9 +11,9 @@ use crate::{ primitives::{AccountId, AssetId, Balance}, Result, StatusCode, }; -pub use asset_management::*; use constants::*; use ink::{env::chain_extension::ChainExtensionMethod, prelude::vec::Vec}; +pub use management::*; pub use metadata::*; // Helper method to build a dispatch call. @@ -485,13 +485,11 @@ mod tests { use super::FungiblesError; use crate::{ constants::{ASSETS, BALANCES}, - primitives::error::{ - ArithmeticError::*, - Error::{self, *}, - TokenError::*, - TransactionalError::*, - }, + ArithmeticError::*, + Error::{self, *}, StatusCode, + TokenError::*, + TransactionalError::*, }; fn error_into_status_code(error: Error) -> StatusCode { diff --git a/runtime/devnet/src/config/mod.rs b/runtime/devnet/src/config/mod.rs index 1dcd44dae..1ef83bc1d 100644 --- a/runtime/devnet/src/config/mod.rs +++ b/runtime/devnet/src/config/mod.rs @@ -1,5 +1,6 @@ mod api; -mod assets; +// Public due to pop api integration tests crate. +pub mod assets; mod contracts; mod proxy; // Public due to integration tests crate. From 84c2840d002003ea1c2d031fdd98340ce8d942a2 Mon Sep 17 00:00:00 2001 From: chungquantin <56880684+chungquantin@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:06:47 +0700 Subject: [PATCH 2/2] fix: revert primitive error imports --- pop-api/src/v0/assets/fungibles.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pop-api/src/v0/assets/fungibles.rs b/pop-api/src/v0/assets/fungibles.rs index 435e17899..4f270e6b2 100644 --- a/pop-api/src/v0/assets/fungibles.rs +++ b/pop-api/src/v0/assets/fungibles.rs @@ -485,11 +485,13 @@ mod tests { use super::FungiblesError; use crate::{ constants::{ASSETS, BALANCES}, - ArithmeticError::*, - Error::{self, *}, + primitives::error::{ + ArithmeticError::*, + Error::{self, *}, + TokenError::*, + TransactionalError::*, + }, StatusCode, - TokenError::*, - TransactionalError::*, }; fn error_into_status_code(error: Error) -> StatusCode {