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

Simplify new plan creation in the SDK #688

Open
eruizgar91 opened this issue Jul 8, 2024 · 0 comments
Open

Simplify new plan creation in the SDK #688

eruizgar91 opened this issue Jul 8, 2024 · 0 comments
Labels
enhancement New feature or request sdk

Comments

@eruizgar91
Copy link
Member

eruizgar91 commented Jul 8, 2024

Is your feature request related to a problem? Please describe.

Currently is a bit complex for a developer create a simple subscription, because the user has to create an assetPrice that pick the fee and other data.

Describe the solution you'd like

We could simplify this process for the final user, so they only need to pass the price that the want to set up and the token address.

      const assetRewardsMap = new Map([[address, BigInt(asset.price)]])

      const feeReceiver = await nvmApp.sdk.keeper.nvmConfig.getFeeReceiver()
      const assetPrice = new AssetPrice(assetRewardsMap).adjustToIncludeNetworkFees(
        feeReceiver,
        NETWORK_FEE_DENOMINATOR,
      )
      assetPrice.setTokenAddress(asset.token.address)

This code can be executed directly in the sdk, so the final user don't need to know how is happening internally.

@eruizgar91 eruizgar91 added enhancement New feature or request sdk labels Jul 8, 2024
@aaitor aaitor changed the title Simplify new plan creation Simplify new plan creation in the SDK Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sdk
Projects
None yet
Development

No branches or pull requests

1 participant