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

TS-SDK Bugs and features #195

Open
ErickRomeroDev opened this issue Jun 13, 2024 · 0 comments
Open

TS-SDK Bugs and features #195

ErickRomeroDev opened this issue Jun 13, 2024 · 0 comments

Comments

@ErickRomeroDev
Copy link

ErickRomeroDev commented Jun 13, 2024

BUG DETECTION

  • The algorithm of NewApplicableAction (myActions) works fine when there is only one role token in my wallet (from the same assetname). However, once I have more than one token, the algorithm seems to think I have none
  • The lifecycleNami.payouts.available() function is constrained by the number of NFTs present in the user's wallet. When the user possesses an excessive number of NFTs (exact threshold unknown, but over 100 NFTs were noted during testing), the function returns [object Object] rather than providing the list of available payouts.
  • When using the TS-SDK in a Next.js application, making a create contract function call that includes a rewardAddress results in a CORS policy error:
    "Access to XMLHttpRequest at 'https://preprod.100.runtime.marlowe-lang.org/contracts' from origin 'http://localhost:3000/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
    This error only happens when the API is called from a client and not from a server (Nodejs App). I am guessing that this issue could be resolved by ensuring the external API (runtime configuration) includes the necessary CORS headers to allow requests from different origins.
  • Contract creation fails when both initial accounts and "Open Role" features are used simultaneously.

FEATURES REQUESTED

  • Another feature nice to have would be the option to be able to search for open roles based on contracts, labels.
  • i have another "feature" that could be included in the short-term. More than a feature, it is a request to include it back, since in previous TS-SDK version this function result was included. In the present TS-SDK 0.4, the result of the fucntion withdraw is empty, and in previous versions it return the TxId, which should be the case.
  • It would be nice for the TS-SDK give some warning related to this restriction (external payout + open role), could be during the input creation or even better, if possible, during the contract creation.
  • Enhance the pagination feature by adding navigation options for moving to the next and previous pages. Additionally, include sorting options for contracts, such as by last update date or creation date. Also, provide an option to change the batch size.

PROBLEMS SOLVED

  • Good news for everyone implementing Marlowe using Next.js! Next.js 15 RC introduces a new feature called "Bundling External Packages." This feature bundles external packages by default, allowing you to opt-out specific ones if needed. Now, we can use Marlowe Wallet, Lifecycle, and Lucid within a Server component.🥳
    this solves an issue previously reported.
    I have already tested this feature and it works in development and production (vercel).
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

1 participant