@@ -387,59 +387,3 @@ export const logToBlocktank = async (
387387) : Promise < void > => {
388388 return bt . bitkitLog ( nodeId , message ) ;
389389} ;
390-
391- /**
392- * Returns Blocktank spending limits in sats, USD & the user's selectedCurrency.
393- * CURRENTLY UNUSED
394- * @param selectedCurrency
395- */
396- // export const getSpendingLimits = ({
397- // selectedCurrency,
398- // }: {
399- // selectedCurrency?: string;
400- // }): {
401- // currentBalance: IDisplayValues;
402- // spendableBalanceSats: number;
403- // spendableBalanceFiat: number;
404- // usdSpendingLimitFiat: number;
405- // spendingLimitSats: number;
406- // selectedCurrencySpendingLimitFiat: number;
407- // } => {
408- // if (!selectedCurrency) {
409- // selectedCurrency = getSettingsStore().selectedCurrency;
410- // }
411- // const usdMax = 1000;
412- // const denominator = 1.2;
413-
414- // const currentBalance = getBalance({ onchain: true });
415- // const spendableBalanceSats = Math.round(
416- // currentBalance.satoshis / denominator,
417- // );
418- // const spendableBalanceFiat = Math.round(
419- // currentBalance.fiatValue / denominator,
420- // );
421- // const usdSpendingLimitFiat =
422- // spendableBalanceFiat < usdMax ? spendableBalanceFiat : usdMax;
423- // const spendingLimitSats = fiatToBitcoinUnit({
424- // fiatValue: usdSpendingLimitFiat,
425- // bitcoinUnit: EBitcoinUnit.satoshi,
426- // currency: 'USD',
427- // });
428- // const selectedCurrencySpendingLimitFiat = getFiatDisplayValues({
429- // satoshis:
430- // spendableBalanceSats < spendingLimitSats
431- // ? spendableBalanceSats
432- // : spendingLimitSats,
433- // bitcoinUnit: EBitcoinUnit.satoshi,
434- // currency: selectedCurrency,
435- // });
436- // return {
437- // currentBalance,
438- // spendableBalanceSats,
439- // spendableBalanceFiat,
440- // usdSpendingLimitFiat,
441- // spendingLimitSats,
442- // selectedCurrencySpendingLimitFiat:
443- // selectedCurrencySpendingLimitFiat.fiatValue,
444- // };
445- // };
0 commit comments