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

Add waitForConfirmation() function to RN SDK for use with declareReceivedPayment and other update actions #1447

Open
MantisClone opened this issue Sep 5, 2024 · 0 comments

Comments

@MantisClone
Copy link
Member

MantisClone commented Sep 5, 2024

Problem

The declarative payment tests and node.js quickstart use this function to confirm requests' updates. However, the RN SDK does not provide this function.

const waitForConfirmation = async (dataOrPromise) => {
  const data = await dataOrPromise;
  return new Promise((resolve, reject) => {
    data.on("confirmed", resolve);
    data.on("error", reject);
  });
};

Proposed Solution

Add this function to the request-client.js package so that builders don't need to define it themselves.

@MantisClone MantisClone converted this from a draft issue Sep 5, 2024
@MantisClone MantisClone moved this from 🆕 New to 🐞🧹 Backlog: Bug, Tech Debt, or Chore in Request Network Tech Backlog Sep 25, 2024
@MantisClone MantisClone moved this from 🐞🧹 Backlog: Bug, Tech Debt, or Chore to 🎫 Backlog in Request Network Tech Backlog Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎫 Backlog
Development

No branches or pull requests

1 participant