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

Amount not passed to MetaMask #3

Open
ghost opened this issue Jun 13, 2020 · 0 comments
Open

Amount not passed to MetaMask #3

ghost opened this issue Jun 13, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 13, 2020

Hey there, I just noticed that the button doesn't seem to pass the amount to MM anymore. I found a little error in the function getEtherPriceIn. It sends a POST request where it should be GET. Now it works.

  getEtherPriceIn(currency) {
    return new Promise((resolve, reject) => {
      fetch(
        `https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=${currency}&sign=true`,
        {
          method: "GET", // <----------------------------------------
          mode: "cors"
        }
      )
        .then(response => response.json())
        .then(data => {
          resolve(data[currency]);
        })
        .catch(e => {
          reject(e);
        });
    });
  }
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

0 participants