我试图在我的运行时同时使用 Assets 模块和 Balances 模块。他们都导出了 Trait T::Balance
。当我将 Assets 模块带入我的特征范围时,如下所示:
pub trait Trait: assets::Trait + balances::Trait {}
我收到以下错误:
error[E0221]: ambiguous associated type `Balance` in bounds of `T`
--> /home/volt/workspaces/lsaether/vyzer/runtime/src/markets.rs:124:42
|
124 | ValidityBond get(validity_bond): T::Balance;
| ^^^^^^^^^^ ambiguous associated type `Balance`
|
note: associated type `T` could derive from `srml_assets::Trait`
--> /home/volt/workspaces/lsaether/vyzer/runtime/src/markets.rs:124:42
|
124 | ValidityBond get(validity_bond): T::Balance;
| ^^^^^^^^^^
note: associated type `T` could derive from `srml_balances::Trait`
--> /home/volt/workspaces/lsaether/vyzer/runtime/src/markets.rs:124:42
|
124 | ValidityBond get(validity_bond): T::Balance;
| ^^^^^^^^^^