Wallet management/Settings improvements (#130)

* New Branch
Splits settings out into their own areas for performance reasons

* Formatting

* Adds cutout logo for navbar

* Better settings loading screen
Better cache handling

* Adds snackbar support
Adds error websocketmessage support

* pushing from one pc to another

* Rejoins settings after failure to be able to seperate them without big rewrites

* Wallet manipulation in settings

* Reformats wallet page
Updates menu to be 'wallets'

* Lists enabled exchanges in settings before you click for modal

* Fixes currency list issue

* Fixes object reference bug in exchange-grid.component.html

* password text
This commit is contained in:
Scott
2018-06-04 19:20:59 +10:00
committed by Adrian Gallagher
parent 0478c55b45
commit a23c145ccc
22 changed files with 382 additions and 242 deletions

View File

@@ -10,14 +10,18 @@ const WEBSOCKET_URL = 'ws://localhost:9050/ws';
export class WebsocketResponseHandlerService {
public messages: Subject<any>;
public shared: Observable<WebSocketMessage>;
public isConnected :boolean = false;
public isConnected: boolean = false;
private ws: WebsocketService;
constructor(@Optional() @SkipSelf() parentModule: WebsocketResponseHandlerService, wsService: WebsocketService) {
this.messages = <Subject<WebSocketMessage>>wsService
this.ws = wsService;
this.messages = <Subject<WebSocketMessage>>this.ws
.connect(WEBSOCKET_URL)
.map((response: MessageEvent): WebSocketMessage => {
this.isConnected = wsService.isConnected;
var interval = setInterval(() => {
this.isConnected = this.ws.isConnected;
}, 2000);
let websocketResponseMessage = JSON.parse(response.data);
var websocketResponseData = websocketResponseMessage.Data === undefined ? websocketResponseMessage.data : websocketResponseMessage.Data;
var websocketResponseEvent = websocketResponseMessage.Event === undefined ? websocketResponseMessage.event : websocketResponseMessage.Event;
@@ -27,10 +31,11 @@ export class WebsocketResponseHandlerService {
responseMessage.data = websocketResponseData;
responseMessage.exchange = websocketResponseMessage.exchange;
responseMessage.assetType = websocketResponseMessage.assetType;
responseMessage.error = websocketResponseMessage.error;
return responseMessage;
});
this.isConnected = wsService.isConnected;
this.isConnected = this.ws.isConnected;
this.shared = this.messages.share(); //multicast
}