flipmeme-sdk 1.3.74 → 1.3.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2190 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -35015,8 +35015,11 @@ var EthereumConnector = class {
|
|
|
35015
35015
|
throw new Error("Signer not initialized");
|
|
35016
35016
|
}
|
|
35017
35017
|
const usdWETHPrice = yield getUSDPriceInWETH();
|
|
35018
|
+
console.log(`Current USD price in WETH: ${usdWETHPrice}`);
|
|
35018
35019
|
const amountInWei = new Decimal2(usdWETHPrice).mul(params.amount).toFixed(0);
|
|
35019
|
-
|
|
35020
|
+
console.log(`usdWETHPrice: ${usdWETHPrice}, amount: ${params.amount}, amountInWei: ${amountInWei}`);
|
|
35021
|
+
const usdAmountInWei = new Decimal2(params.amount).mul(new Decimal2(10).pow(6)).toFixed(0);
|
|
35022
|
+
const tx = yield this.factory.buyCreditByEth(ETH_COMMON.ADMIN_FOR_CREDIT_BUY, usdAmountInWei, (_a = params.slippage) != null ? _a : 300, { value: amountInWei });
|
|
35020
35023
|
const receipt = yield tx.wait();
|
|
35021
35024
|
return receipt.transactionHash;
|
|
35022
35025
|
});
|