diff --git a/src/modules/users/providers/wallet.service.ts b/src/modules/users/providers/wallet.service.ts index 457baee..57da157 100644 --- a/src/modules/users/providers/wallet.service.ts +++ b/src/modules/users/providers/wallet.service.ts @@ -14,7 +14,7 @@ export class WalletService { constructor( private readonly walletTransactionRepository: WalletTransactionRepository, private readonly pointTransactionRepository: PointTransactionRepository, - ) { } + ) {} async getUserWalletTransactions( userId: string, @@ -172,10 +172,12 @@ export class WalletService { return transaction; } - getUserCurrentWalletBalance(userId: string, restuarantId: string) { - return this.walletTransactionRepository.getCurrentWalletBalance(userId, restuarantId) + async getUserCurrentWalletBalance(userId: string, restuarantId: string) { + const balance = await this.walletTransactionRepository.getCurrentWalletBalance(userId, restuarantId); + return { balance }; } - getUserCurrentPoinrBalance(userId: string, restuarantId: string) { - return this.pointTransactionRepository.getcurrentPointBalance(userId, restuarantId) + async getUserCurrentPoinrBalance(userId: string, restuarantId: string) { + const balance = await this.pointTransactionRepository.getcurrentPointBalance(userId, restuarantId); + return { balance }; } } diff --git a/src/seeders/user-wallets.seeder.ts b/src/seeders/user-wallets.seeder.ts index ba266ef..068afd1 100644 --- a/src/seeders/user-wallets.seeder.ts +++ b/src/seeders/user-wallets.seeder.ts @@ -22,7 +22,7 @@ export class UserWalletsSeeder { user, restaurant, balance: 150000000, - amount: 1250, + amount: 150000000, type: WalletTransactionType.CREDIT, reason: WalletTransactionReason.DEPOSIT, });