I am trying sell ETH and buy DAI. Trying to test it on Ropsten but the transaction fails saying - invalid transaction key - price.
Here is the my code
let wallet = new ethers.Wallet(wallet_privateKey);
let walletSigner = wallet.connect(provTest);
// Fetch quote from 0x API
const response = await fetch(
'https://ropsten.api.0x.org/swap/v1/quote?buyToken=DAI&sellToken=ETH&buyAmount=10000000000000000000&takerAddress=0xbd2e8c4026a3309AEb5978b51326278ffA01cb7a',
);
const quote = await response.json();
// sending the transaction
await walletSigner.sendTransaction(await quote).then(transaction => {
console.log(transaction);
alert('Swap finished!');
});
await
and `.then(...`` in the same place.