Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Funds naming collision #97

Closed
adairrr opened this issue Mar 9, 2023 · 1 comment
Closed

Funds naming collision #97

adairrr opened this issue Mar 9, 2023 · 1 comment

Comments

@adairrr
Copy link
Contributor

adairrr commented Mar 9, 2023

If you have a parameter in a message called funds it collides with the funds that one can provide for the coins in the message.

Example:

pub enum AutocompounderExecuteMsg {
    ...
    /// Join vault by depositing one or more funds
    Deposit { funds: Vec<OfferAsset> },
}
export interface AutocompounderInterface extends AutocompounderReadOnlyInterface {
...
  deposit: (
    {
      funds,
    }: {
      funds: AnsAsset[]
    },
    fee?: number | StdFee | 'auto',
    memo?: string,
    funds?: Coin[]
  ) => Promise<ExecuteResult>
...
}

I propose that we rename fee, memo, and funds to their underscored variants: _fee, _memo, and _funds.

@pyramation
Copy link
Collaborator

oh interesting! totally good idea

we can put it under a flag called underscoreMetaParams or something that makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants