mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 14:22:33 +01:00
28 lines
470 B
TypeScript
28 lines
470 B
TypeScript
import { LndObject } from 'server/types/ln-service.types';
|
|
|
|
export class SavedLnd {
|
|
hash: string | null;
|
|
lnd: LndObject | null;
|
|
|
|
constructor() {
|
|
this.hash = null;
|
|
this.lnd = null;
|
|
}
|
|
|
|
save(hash: string, lnd: LndObject) {
|
|
this.hash = hash;
|
|
this.lnd = lnd;
|
|
}
|
|
|
|
reset() {
|
|
this.hash = null;
|
|
this.lnd = null;
|
|
}
|
|
|
|
isSame(hash: string): boolean {
|
|
if (hash === this.hash && this.lnd) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|