From 771f2e09acebf738661dc6fd37577c4702f39a63 Mon Sep 17 00:00:00 2001 From: BenRey Date: Thu, 28 Nov 2024 10:01:56 +0100 Subject: [PATCH] refactor MassaStationWallet methods to remove warnings and clarify connection status --- src/massaStation/MassaStationWallet.ts | 28 +++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/massaStation/MassaStationWallet.ts b/src/massaStation/MassaStationWallet.ts index 30f2ada..01c2eed 100644 --- a/src/massaStation/MassaStationWallet.ts +++ b/src/massaStation/MassaStationWallet.ts @@ -161,31 +161,35 @@ export class MassaStationWallet implements Wallet { }; } + /** + * Simulates connecting to the station. + * This method always returns `true` because the station is inherently connected. + */ public async connect(): Promise { - console.warn( - "Warning: 'connect' is not implemented. Returning true because the station is always connected.", - ); return true; } + /** + * Simulates disconnecting from the station. + * This method always returns `true` because the station cannot be disconnected. + */ public async disconnect(): Promise { - console.warn( - "Warning: 'disconnect' is not implemented. Returning true because the station cannot be disconnected.", - ); return true; } + /** + * Indicates if the station is connected. + * Always returns `true` because the station is always connected when running. + */ public connected(): boolean { - console.warn( - "Warning: 'connected' is not implemented. Returning true because the station is always connected when running.", - ); return true; } + /** + * Indicates if the station is enabled. + * Always returns `true` because the station is always enabled by default. + */ public enabled(): boolean { - console.warn( - "Warning: 'enabled' is not implemented. Returning true because the station is always enabled.", - ); return true; } }