This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rowan de Haas
committed
Jul 30, 2019
1 parent
e7f29c4
commit ced4504
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
StratisCore.UI/src/app/shared/services/current-account.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
/* | ||
* Used to maintain the state of the currently selected address in CirrusCore. | ||
*/ | ||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class CurrentAccountService { | ||
|
||
address: string; | ||
|
||
constructor() { } | ||
|
||
getAddress() { | ||
return this.address; | ||
} | ||
|
||
setAddress(value: string) { | ||
this.address = value; | ||
} | ||
|
||
hasActiveAddress() { | ||
return !!this.address; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters