[bug] remove test code

This commit is contained in:
Sosthene 2025-08-23 16:10:11 +02:00
parent 046eef18e6
commit 1c92a40984

View File

@ -989,15 +989,6 @@ export default class Services {
throw new Error(`Failed to save updated device: ${e}`);
}
} else {
// For testing, set last_scan and birthday a few blocks ago
device.sp_wallet.last_scan = this.currentBlockHeight - 10;
device.sp_wallet.birthday = this.currentBlockHeight - 10;
try {
this.sdkClient.restore_device(device);
} catch (e) {
throw new Error(`Failed to restore device: ${e}`);
}
await this.saveDeviceInDatabase(device);
// This is existing device, we need to catch up if last_scan is lagging behind chain_tip
if (device.sp_wallet.last_scan < this.currentBlockHeight) {
// We need to catch up