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

Fix outdated escrow code samples #2787

Open
mDuo13 opened this issue Sep 25, 2024 · 0 comments
Open

Fix outdated escrow code samples #2787

mDuo13 opened this issue Sep 25, 2024 · 0 comments
Assignees
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts javascript Pull requests that update Javascript code

Comments

@mDuo13
Copy link
Collaborator

mDuo13 commented Sep 25, 2024

The _code_samples/escrow/js/ folder has several issues:

  • the package.json requires both xrpl.js 3.0 and ripple-lib 0.17 (the latter is ancient and unused in the code). It's likely that ripple-lib is the source of the security issue flagged in chore: upgrade realm version and migrate deprecated config #2783.
  • the samples use the if (typeof module !== "undefined") hack, which is intended to make the same code run in both a browser via html file and in node.js, but they don't have a demo HTML file
  • The samples use hard-coded secrets instead of using the faucet
  • The existing tutorials like Send a Time-Held Escrow use WebSocket requests for sign-and-submit (insecure unless you know what you're doing) instead of signing using the client library
@mDuo13 mDuo13 self-assigned this Sep 25, 2024
@mDuo13 mDuo13 added content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts javascript Pull requests that update Javascript code labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content updates Updating, cleaning up, or rewriting existing content for better usability or new contexts javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

1 participant