Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notary Server Url Constant #54

Merged
merged 9 commits into from
Apr 9, 2024
3 changes: 2 additions & 1 deletion src/pages/Options/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import {
NOTARY_API_LS_KEY,
PROXY_API_LS_KEY,
} from '../../utils/storage';
import { NOTARY_API } from '../../utils/constants';

export default function Options(): ReactElement {
const [notary, setNotary] = useState('https://notary.pse.dev');
const [notary, setNotary] = useState(NOTARY_API);
const [proxy, setProxy] = useState('wss://notary.pse.dev/proxy');
Codetrauma marked this conversation as resolved.
Show resolved Hide resolved
const [dirty, setDirty] = useState(false);

Expand Down
3 changes: 2 additions & 1 deletion src/reducers/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } from '../utils/constants';

enum ActionType {
'/requests/setRequests' = '/requests/setRequests',
Expand Down Expand Up @@ -40,7 +41,7 @@ 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');
const notaryUrl = await get(NOTARY_API_LS_KEY, NOTARY_API);
const websocketProxyUrl = await get(
PROXY_API_LS_KEY,
'wss://notary.pse.dev/proxy',
Expand Down
1 change: 1 addition & 0 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const EXPLORER_API = 'http://localhost:3000';
export const NOTARY_API = 'https://notary.pse.dev/v0.1.0-alpha.5';
Loading