whallets upgrade function
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import db from "../config/database.js";
|
||||
import WalletService from "../utils/walletService.js";
|
||||
import WalletUtils from "../utils/walletUtils.js";
|
||||
|
||||
export default class Wallet {
|
||||
static getBaseWalletType(walletType) {
|
||||
@@ -50,7 +50,7 @@ export default class Wallet {
|
||||
static async getActiveWalletsBalance(userId) {
|
||||
const activeWallets = await this.getActiveWallets(userId);
|
||||
|
||||
const walletService = new WalletService(
|
||||
const walletUtilsInstance = new WalletUtils(
|
||||
activeWallets.btc,
|
||||
activeWallets.ltc,
|
||||
activeWallets.tron,
|
||||
@@ -59,7 +59,7 @@ export default class Wallet {
|
||||
Date.now() - 30 * 24 * 60 * 60 * 1000
|
||||
);
|
||||
|
||||
const balances = await walletService.getAllBalances();
|
||||
const balances = await walletUtilsInstance.getAllBalances();
|
||||
|
||||
let totalUsdBalance = 0;
|
||||
|
||||
@@ -86,7 +86,7 @@ export default class Wallet {
|
||||
static async getArchivedWalletsBalance(userId) {
|
||||
const archiveWallets = await this.getArchivedWallets(userId);
|
||||
|
||||
const walletService = new WalletService(
|
||||
const walletUtilsInstance = new WalletUtils(
|
||||
archiveWallets.btc,
|
||||
archiveWallets.ltc,
|
||||
archiveWallets.tron,
|
||||
@@ -95,7 +95,7 @@ export default class Wallet {
|
||||
Date.now() - 30 * 24 * 60 * 60 * 1000
|
||||
);
|
||||
|
||||
const balances = await walletService.getAllBalances();
|
||||
const balances = await walletUtilsInstance.getAllBalances();
|
||||
|
||||
let totalUsdBalance = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user