Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@tonyalaribe
Copy link
Contributor

WIP: nothing to see yet

PartialOrd,
RuntimeDebug,
)]
pub enum NativeOrAssetBalance<AssetId, NativeBalance, AssetBalance> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we stop doing this? it shouldn't be the treasury's job to handle the difference between native and other assets. just build another pallet/helper for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious though. How would you approach it in a practical sense. Assuming it's a new pallet, how would it work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've gone through it, and I'm exploring introducing a separate pallet for the multi asset functionality, which in turn actually makes things easier

tonyalaribe and others added 5 commits March 10, 2023 11:04
* Runtime method to get user's assets balances

* Fix test (typo)

* Update frame/assets/src/functions.rs

* Remove instance param

* Update frame/assets/src/functions.rs

Co-authored-by: Bastian Köcher <[email protected]>

* Remove instance param

* Refactor

* Chore

* Update doc

---------

Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: parity-processbot <>
let beneficiary = T::Lookup::lookup(beneficiary)?;

ensure!(amount <= max_amount, Error::<T, I>::InsufficientPermission);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is carried over from a cherry picked commit and won't be in the final PR. Please ignore.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2512790

@wischli wischli mentioned this pull request Mar 15, 2023
4 tasks
@tonyalaribe
Copy link
Contributor Author

With some exploration, it seems a simpler solution is making the treasury more generic to the payment approach. So, I'm closing this in favour of a different PR: #13607

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants