From 4bbfe367f72ad80689435df360c53704be874205 Mon Sep 17 00:00:00 2001 From: sosoxuc Date: Mon, 2 Sep 2024 20:02:05 +0400 Subject: [PATCH] Fix parameters bug --- quickstart-template/trade-assets.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstart-template/trade-assets.js b/quickstart-template/trade-assets.js index 510a6980..440f1cdc 100644 --- a/quickstart-template/trade-assets.js +++ b/quickstart-template/trade-assets.js @@ -9,7 +9,11 @@ let wallet = await Wallet.create({ networkId: Coinbase.networks.BaseMainnet }); * Fund the Wallet's default Address with ETH from an external source. * Trade 0.00001 ETH to USDC. */ -let trade = await wallet.createTrade(0.00001, Coinbase.assets.Eth, Coinbase.assets.Usdc); +let trade = await wallet.createTrade({ + amount: 0.00001, + fromAssetId: Coinbase.assets.Eth, + toAssetId: Coinbase.assets.Usdc, +}); // Wait for the trade to complete or fail on-chain. await trade.wait();