consolidate wallet sync status into shared WalletSyncStatus type.

This commit is contained in:
2026-09-06 15:21:13 +02:00
parent 9e776df79f
commit 5f1c8bee4b
8 changed files with 22 additions and 27 deletions
@@ -2,7 +2,7 @@ import { BadRequestException, ServiceUnavailableException } from '@nestjs/common
import type { ConfigService } from '@nestjs/config';
import axios from 'axios';
import type { AuthService } from '../../auth/services/AuthService';
import { MoneroWalletSyncStatus } from '../types/MoneroWalletSyncStatus';
import { WalletSyncStatus } from '../../../types/wallet/WalletSyncStatus';
import type { MoneroWalletRpcClient } from './MoneroWalletRpcClient';
import { MoneroWalletAdminService } from './MoneroWalletAdminService';
@@ -76,7 +76,7 @@ describe('MoneroWalletAdminService', () => {
rpcVersion: '0.18.3.1',
walletHeight: 3_000_000,
daemonHeight: 3_000_000,
syncStatus: MoneroWalletSyncStatus.Synced,
syncStatus: WalletSyncStatus.Synced,
balanceXmr: '2.00000000',
unlockedBalanceXmr: '1.00000000'
})
@@ -137,7 +137,7 @@ describe('MoneroWalletAdminService', () => {
const status = await service.getStatus();
expect(status.syncStatus).toBe(MoneroWalletSyncStatus.Unknown);
expect(status.syncStatus).toBe(WalletSyncStatus.Unknown);
expect(status.daemonHeight).toBeNull();
});
@@ -149,7 +149,7 @@ describe('MoneroWalletAdminService', () => {
const status = await service.getStatus();
expect(status.syncStatus).toBe(MoneroWalletSyncStatus.Synced);
expect(status.syncStatus).toBe(WalletSyncStatus.Synced);
});
it('throws when reveal seed RPC fails', async () => {