Signer provenance (#4477)
* Signer - Tracking Request Provenance * Basic UI * Changing messages * VecDeque::from * Fix dapps tests * Addressing UI grumbles
This commit is contained in:
@@ -203,6 +203,13 @@ export function outSignerRequest (request) {
|
||||
request[key].signTransaction = outTransaction(request[key].signTransaction);
|
||||
request[key].sendTransaction = outTransaction(request[key].sendTransaction);
|
||||
break;
|
||||
|
||||
case 'origin':
|
||||
const type = Object.keys(request[key])[0];
|
||||
const details = request[key][type];
|
||||
|
||||
request[key] = { type, details };
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export default class Ws extends JsonRpcBase {
|
||||
this._url = url;
|
||||
this._token = token;
|
||||
this._messages = {};
|
||||
this._sessionHash = null;
|
||||
|
||||
this._connecting = false;
|
||||
this._connected = false;
|
||||
@@ -78,12 +79,14 @@ export default class Ws extends JsonRpcBase {
|
||||
this._ws.onmessage = null;
|
||||
this._ws.close();
|
||||
this._ws = null;
|
||||
this._sessionHash = null;
|
||||
}
|
||||
|
||||
this._connecting = true;
|
||||
this._connected = false;
|
||||
this._lastError = null;
|
||||
|
||||
this._sessionHash = sha3;
|
||||
this._ws = new WebSocket(this._url, hash);
|
||||
this._ws.onerror = this._onError;
|
||||
this._ws.onopen = this._onOpen;
|
||||
@@ -255,6 +258,10 @@ export default class Ws extends JsonRpcBase {
|
||||
return this._token;
|
||||
}
|
||||
|
||||
get sessionHash () {
|
||||
return this._sessionHash;
|
||||
}
|
||||
|
||||
get isAutoConnect () {
|
||||
return this._autoConnect;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user