Skip to content

fungibles methods should not consume AssetId #3968

@liamaharon

Description

@liamaharon

Methods such as

fn balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance;
should take a ref rather than consume the AssetId.

It was probably written this way back when AssetIds were small and implemented Copy, but that's no longer the case with the increasing usage of XCM Locations as AssetIds.

All relevant fungibles methods should be updated, and unnecessary cloning of large types removed (e.g. in the asset-conversion pallet).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C1-mentorA task where a mentor is available. Please indicate in the issue who the mentor could be.C2-good-first-issueA task for a first time contributor to become familiar with the Polkadot-SDK.T1-FRAMEThis PR/Issue is related to core FRAME, the framework.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions