Skip to content

Amount not passed to MetaMask #3

@ghost

Description

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);
        });
    });
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions