@reflectmoney/stable.ts 1.2.6 → 1.2.7
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.
|
@@ -272,10 +272,11 @@ class UsdcPlusStablecoin extends Stablecoin_1.Stablecoin {
|
|
|
272
272
|
.driftClient
|
|
273
273
|
.getSpotMarketAccount(0);
|
|
274
274
|
const usdcAmount = (0, sdk_2.getTokenAmount)(scaledBalance, spotMarketAccount, balanceType);
|
|
275
|
+
console.log({ usdcAmount: usdcAmount.toNumber() });
|
|
275
276
|
const { supply, decimals } = yield (0, spl_token_1.getMint)(this.connection, this.stablecoinMint, "confirmed");
|
|
276
277
|
const [{ mint: usdcMint }] = this.collaterals;
|
|
277
278
|
const { data: [{ price: { expo, price } }] } = yield this.getCollateralPrice(usdcMint);
|
|
278
|
-
console.log({ price, expo });
|
|
279
|
+
console.log({ price, expo, supply, EXCHANGE_RATE_PRECISION: constants_1.EXCHANGE_RATE_PRECISION, decimals });
|
|
279
280
|
const exchangeRate = usdcAmount
|
|
280
281
|
.mul(new bn_js_1.default(price))
|
|
281
282
|
.mul(new bn_js_1.default(constants_1.EXCHANGE_RATE_PRECISION)) // gives us exhcnage rate precision
|