@@ -201,13 +201,13 @@ export function normalizeNodeFilters(
201
201
publicIPs : filters . ipv4 || undefined ,
202
202
hasIPv6 : filters . ipv6 || undefined ,
203
203
hasGPU : filters . hasGPU || undefined ,
204
- rentedBy : filters . dedicated ? options ?. twinId : undefined ,
205
204
certified : filters . certified || undefined ,
206
- availableFor : options ?. twinId ,
205
+ availableFor : filters . dedicated ? undefined : options ?. twinId ,
207
206
region : options ?. location . region ? options ?. location . region : options ?. location . subregion ,
208
207
country : options ?. location . country ,
209
208
gateway : options ?. gateway ,
210
209
healthy : true ,
210
+ rentableOrRentedBy : filters . dedicated ? options ?. twinId : undefined ,
211
211
planetary : filters . planetary ,
212
212
mycelium : filters . mycelium ,
213
213
wireguard : filters . wireguard ,
@@ -227,6 +227,9 @@ export async function validateRentContract(
227
227
}
228
228
229
229
try {
230
+ if ( node . dedicated && node . rentedByTwinId === 0 ) {
231
+ throw `Node ${ node . nodeId } is not rented` ;
232
+ }
230
233
if ( node . rentContractId !== 0 ) {
231
234
const contractInfo = await gridStore . grid . contracts . get ( {
232
235
id : node . rentContractId ,
0 commit comments