mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
🔥 debug code removed
This commit is contained in:
parent
2a3771e45a
commit
651ca5b4dc
3 changed files with 7 additions and 15 deletions
|
@ -125,10 +125,5 @@ export const ytUrlResolversSettings = {
|
||||||
name: "Madiator Finder",
|
name: "Madiator Finder",
|
||||||
href: "https://finder.madiator.com/api/v1/resolve",
|
href: "https://finder.madiator.com/api/v1/resolve",
|
||||||
signRequest: true
|
signRequest: true
|
||||||
}),
|
|
||||||
local: ytUrlResolver({
|
|
||||||
name: "Local",
|
|
||||||
href: "http://localhost:3000/api/v1/resolve",
|
|
||||||
signRequest: true
|
|
||||||
})
|
})
|
||||||
}
|
}
|
|
@ -19,6 +19,12 @@ export function useSettings(initial: ExtensionSettings) {
|
||||||
if (changeSet.length === 0) return // no changes; no use dispatching
|
if (changeSet.length === 0) return // no changes; no use dispatching
|
||||||
dispatch(Object.fromEntries(changeSet))
|
dispatch(Object.fromEntries(changeSet))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!state.privateKey || !state.publicKey) generateKeys().then((keys) => {
|
||||||
|
setSetting('publicKey', keys.publicKey)
|
||||||
|
setSetting('privateKey', keys.privateKey)
|
||||||
|
})
|
||||||
|
|
||||||
chrome.storage.onChanged.addListener(changeListener)
|
chrome.storage.onChanged.addListener(changeListener)
|
||||||
chrome.storage.local.get(Object.keys(initial), o => dispatch(o as Partial<ExtensionSettings>))
|
chrome.storage.local.get(Object.keys(initial), o => dispatch(o as Partial<ExtensionSettings>))
|
||||||
|
|
||||||
|
@ -33,12 +39,4 @@ export const setSetting = <K extends keyof ExtensionSettings>(setting: K, value:
|
||||||
|
|
||||||
|
|
||||||
/** A hook to read watch on lbry settings from local storage */
|
/** A hook to read watch on lbry settings from local storage */
|
||||||
export const useLbrySettings = () => useSettings(DEFAULT_SETTINGS)
|
export const useLbrySettings = () => useSettings(DEFAULT_SETTINGS)
|
||||||
|
|
||||||
{
|
|
||||||
const settings = useLbrySettings()
|
|
||||||
if (!settings.publicKey || !settings.privateKey) generateKeys().then((keys) => {
|
|
||||||
setSetting('publicKey', keys.publicKey)
|
|
||||||
setSetting('privateKey', keys.privateKey)
|
|
||||||
})
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@
|
||||||
"https://odysee.com/",
|
"https://odysee.com/",
|
||||||
"https://madiator.com/",
|
"https://madiator.com/",
|
||||||
"https://finder.madiator.com/",
|
"https://finder.madiator.com/",
|
||||||
"http://localhost:3000",
|
|
||||||
"tabs",
|
"tabs",
|
||||||
"storage"
|
"storage"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Reference in a new issue