Skip to content

Commit

Permalink
chore(window.ipfs): remove most window.ipfs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Jul 1, 2023
1 parent 79772f7 commit 58adfdf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/bundles/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const notify = {
const { eventId, code } = notify

if (eventId === 'STATS_FETCH_FAILED') {
return provider === 'window.ipfs' ? 'windowIpfsRequestFailed' : 'ipfsApiRequestFailed'
return 'ipfsApiRequestFailed'
}
if (eventId === 'IPFS_CONNECT_FAILED') {
return 'ipfsConnectFail'
Expand Down
13 changes: 0 additions & 13 deletions src/bundles/notify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ it('should notify about api stats fetch errors', async () => {
expect(store.selectNotifyI18nKey()).toEqual('ipfsApiRequestFailed')
})

it('should notify about window.ipfs fetch errors', async () => {
const store = composeBundlesRaw(
appTimeBundle,
ipfsBundle('window.ipfs'),
notifyBundle
)()
expect(store.selectNotify().show).toEqual(false)
store.dispatch({ type: 'STATS_FETCH_FAILED' })
expect(store.selectNotify().show).toEqual(true)
expect(store.selectNotify().error).toEqual(true)
expect(store.selectNotifyI18nKey()).toEqual('windowIpfsRequestFailed')
})

it('should notify about connection returning after a previous error', async () => {
const store = composeBundlesRaw(
appTimeBundle,
Expand Down
5 changes: 1 addition & 4 deletions src/components/provider-link/ProviderLink.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React from 'react'

const providers = {
'window.ipfs': {
url: 'https://github.com/ipfs-shipyard/ipfs-companion'
},
'ipfs-companion': {
url: 'https://github.com/ipfs-shipyard/ipfs-companion'
url: 'https://github.com/ipfs/ipfs-companion'
},
kubo: {
url: 'https://github.com/ipfs/kubo'
Expand Down
2 changes: 1 addition & 1 deletion src/files/FilesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const FilesPage = ({
<MainView t={t} files={files} remotePins={remotePins} pendingPins={pendingPins} failedPins={failedPins} doExploreUserProvidedPath={doExploreUserProvidedPath}/>

<InfoBoxes isRoot={filesPathInfo.isMfs && filesPathInfo.isRoot}
isCompanion={ipfsProvider === 'window.ipfs'}
isCompanion={false}
filesExist={!!(files && files.content && files.content.length)} />

<Modals
Expand Down

0 comments on commit 58adfdf

Please sign in to comment.