Extension fixes (#6284)
* Fix token symbols in extension. * Allow connections from firefox extension.
This commit is contained in:
parent
b5b6e3dd2a
commit
10068cee72
@ -64,14 +64,19 @@ class FakeTransport {
|
||||
|
||||
class FrameSecureApi extends SecureApi {
|
||||
constructor (transport) {
|
||||
super(transport.uiUrl, null, () => {
|
||||
return transport;
|
||||
});
|
||||
super(
|
||||
transport.uiUrl,
|
||||
null,
|
||||
() => transport,
|
||||
() => 'http:'
|
||||
);
|
||||
}
|
||||
|
||||
connect () {
|
||||
// Do nothing - this API does not need connecting
|
||||
this.emit('connecting');
|
||||
// Fetch settings
|
||||
this._fetchSettings();
|
||||
// Fire connected event with some delay.
|
||||
setTimeout(() => {
|
||||
this.emit('connected');
|
||||
|
@ -195,7 +195,7 @@ usage! {
|
||||
or |c: &Config| otry!(c.websockets).interface.clone(),
|
||||
flag_ws_apis: String = "web3,eth,pubsub,net,parity,parity_pubsub,traces,rpc,secretstore,shh,shh_pubsub",
|
||||
or |c: &Config| otry!(c.websockets).apis.as_ref().map(|vec| vec.join(",")),
|
||||
flag_ws_origins: String = "chrome-extension://*",
|
||||
flag_ws_origins: String = "chrome-extension://*,moz-extension://*",
|
||||
or |c: &Config| otry!(c.websockets).origins.as_ref().map(|vec| vec.join(",")),
|
||||
flag_ws_hosts: String = "none",
|
||||
or |c: &Config| otry!(c.websockets).hosts.as_ref().map(|vec| vec.join(",")),
|
||||
|
@ -1301,7 +1301,7 @@ mod tests {
|
||||
interface: "127.0.0.1".into(),
|
||||
port: 8546,
|
||||
apis: ApiSet::UnsafeContext,
|
||||
origins: Some(vec!["chrome-extension://*".into()]),
|
||||
origins: Some(vec!["chrome-extension://*".into(), "moz-extension://*".into()]),
|
||||
hosts: Some(vec![]),
|
||||
signer_path: expected.into(),
|
||||
ui_address: Some(("127.0.0.1".to_owned(), 8180)),
|
||||
|
@ -163,7 +163,7 @@ impl Default for WsConfiguration {
|
||||
interface: "127.0.0.1".into(),
|
||||
port: 8546,
|
||||
apis: ApiSet::UnsafeContext,
|
||||
origins: Some(vec!["chrome-extension://*".into()]),
|
||||
origins: Some(vec!["chrome-extension://*".into(), "moz-extension://*".into()]),
|
||||
hosts: Some(Vec::new()),
|
||||
signer_path: replace_home(&data_dir, "$BASE/signer").into(),
|
||||
support_token_api: true,
|
||||
|
Loading…
Reference in New Issue
Block a user