sunshine-protocol / sunshine

Governance + Bounty Platform
Other
43 stars 16 forks source link

change `OnChainTreasuryID` to `T::TreasuryId` for bank module #91

Closed 4meta5 closed 4 years ago

4meta5 commented 4 years ago

despite the Codec bound on the associated type, this error was returned.

error[E0277]: the trait bound `<T as Trait>::TreasuryId: _::_parity_scale_codec::EncodeLike` is not satisfied
   --> modules/bank/src/lib.rs:125:1
    |
125 | / decl_storage! {
126 | |     trait Store for Module<T: Trait> as Bank {
127 | |         /// Counter for generating uniqe bank accounts
128 | |         BankIDNonce get(fn bank_id_nonce): T::TreasuryId;
...   |
155 | |     }
156 | | }
    | |_^ the trait `_::_parity_scale_codec::EncodeLike` is not implemented for `<T as Trait>::TreasuryId`
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `sunshine-bank`.

To learn more, run the command again with --verbose.
4meta5 commented 4 years ago

stale now because I merged #89 which adds a lot on top of this but the last commit may be useful if we ever decide to make this change in the future