Skip to content
2 changes: 1 addition & 1 deletion src/bundles/gateway.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readSetting, writeSetting } from './local-storage.js'
import { readSetting, writeSetting } from '../lib/local-storage.js'

// TODO: switch to dweb.link when https://github.com/ipfs/kubo/issues/7318
export const DEFAULT_PATH_GATEWAY = 'https://ipfs.io'
Expand Down
8 changes: 4 additions & 4 deletions src/bundles/ipfs-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import first from 'it-first'
import last from 'it-last'
import * as Enum from '../lib/enum.js'
import { perform } from './task.js'
import { readSetting, writeSetting } from './local-storage.js'
import { contextBridge } from '../helpers/context-bridge'
import { createSelector } from 'redux-bundler'
import { readSetting, writeSetting } from '../lib/local-storage.js'

/**
* @typedef {import('ipfs').IPFSService} IPFSService
Expand Down Expand Up @@ -327,16 +327,16 @@ const actions = {
/** For the Explore page (i.e. ipld-explorer-components) */
const useRemoteGatewaysToExplore = localStorage.getItem('explore.ipld.gatewayEnabled')
if (useRemoteGatewaysToExplore === null) {
// by default, disable remote gateways for the Explore page (i.e. ipld-explorer-components)
// by default, disable remote gateways for the Explore page (i.e. ipld-explorer-components)
await writeSetting('explore.ipld.gatewayEnabled', false)
}

const kuboGateway = readSetting('kuboGateway')
if (kuboGateway === null || typeof kuboGateway === 'string' || typeof kuboGateway === 'boolean' || typeof kuboGateway === 'number') {
// empty or invalid, set defaults
// empty or invalid, set defaults
await writeSetting('kuboGateway', { trustlessBlockBrokerConfig: { init: { allowLocal: true, allowInsecure: false } } })
} else if (/** @type {Record<string, any>} */(kuboGateway).trustlessBlockBrokerConfig == null) {
// missing trustlessBlockBrokerConfig, set defaults
// missing trustlessBlockBrokerConfig, set defaults
await writeSetting('kuboGateway', { ...kuboGateway, trustlessBlockBrokerConfig: { init: { allowLocal: true, allowInsecure: false } } })
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/bundles/ipns.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import all from 'it-all'
import { readSetting, writeSetting } from './local-storage.js'
import { readSetting, writeSetting } from '../lib/local-storage.js'
import { dispatchAsyncProvide } from './files/utils.js'

const init = () => ({
Expand Down
3 changes: 1 addition & 2 deletions src/bundles/pinning.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { pinningServiceTemplates } from '../constants/pinning.js'
import memoize from 'p-memoize'
import { CID } from 'multiformats/cid'
import all from 'it-all'

import { readSetting, writeSetting } from './local-storage.js'
import { readSetting, writeSetting } from '../lib/local-storage.js'
import { dispatchAsyncProvide } from './files/utils.js'

// This bundle leverages createCacheBundle and persistActions for
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"src/bundles/ipfs-provider.js",
"src/bundles/retry-init.js",
"src/bundles/retry-init.js",
"src/bundles/local-storage.js",
"src/lib/local-storage.js",
"src/bundles/task.js",
"src/lib/count-dirs.js",
"src/lib/sort.js",
Expand Down