mirror of
https://github.com/tlsnotary/tlsn-extension.git
synced 2026-01-09 21:18:02 -05:00
Merge pull request #54 from tlsnotary/notary-api
Notary Server Url Constant
This commit is contained in:
@@ -5,10 +5,12 @@ import {
|
||||
NOTARY_API_LS_KEY,
|
||||
PROXY_API_LS_KEY,
|
||||
} from '../../utils/storage';
|
||||
import { NOTARY_API, NOTARY_PROXY } from '../../utils/constants';
|
||||
|
||||
export default function Options(): ReactElement {
|
||||
const [notary, setNotary] = useState('https://notary.pse.dev/v0.1.0-alpha.5');
|
||||
const [proxy, setProxy] = useState('wss://notary.pse.dev/proxy');
|
||||
const [notary, setNotary] = useState(NOTARY_API);
|
||||
const [proxy, setProxy] = useState(NOTARY_PROXY);
|
||||
|
||||
const [dirty, setDirty] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -8,6 +8,7 @@ import deepEqual from 'fast-deep-equal';
|
||||
import { get, NOTARY_API_LS_KEY, PROXY_API_LS_KEY } from '../utils/storage';
|
||||
import { BackgroundActiontype } from '../entries/Background/rpc';
|
||||
import browser from 'webextension-polyfill';
|
||||
import { NOTARY_API, NOTARY_PROXY } from '../utils/constants';
|
||||
|
||||
enum ActionType {
|
||||
'/requests/setRequests' = '/requests/setRequests',
|
||||
@@ -40,14 +41,8 @@ export const setRequests = (requests: RequestLog[]): Action<RequestLog[]> => ({
|
||||
});
|
||||
|
||||
export const notarizeRequest = (options: RequestHistory) => async () => {
|
||||
const notaryUrl = await get(
|
||||
NOTARY_API_LS_KEY,
|
||||
'https://notary.pse.dev/v0.1.0-alpha.5',
|
||||
);
|
||||
const websocketProxyUrl = await get(
|
||||
PROXY_API_LS_KEY,
|
||||
'wss://notary.pse.dev/proxy',
|
||||
);
|
||||
const notaryUrl = await get(NOTARY_API_LS_KEY, NOTARY_API);
|
||||
const websocketProxyUrl = await get(PROXY_API_LS_KEY, NOTARY_PROXY);
|
||||
|
||||
chrome.runtime.sendMessage<any, string>({
|
||||
type: BackgroundActiontype.prove_request_start,
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
export const EXPLORER_API = 'http://localhost:3000';
|
||||
export const NOTARY_API = 'https://notary.pse.dev/v0.1.0-alpha.5';
|
||||
export const NOTARY_PROXY = 'wss://notary.pse.dev/proxy';
|
||||
|
||||
Reference in New Issue
Block a user