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

Fix config not saving #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rishi556
Copy link
Contributor

@Rishi556 Rishi556 commented Apr 2, 2023

When the program couldn't connect to IPFS due to it not being run locally caused by the following code:

async start() {
if (this.self.config.get('remote_gateway.enabled')) {
this.apiUrl = this.self.config.get('remote_gateway.api') || 'http://127.0.0.1:4005'
console.log(`${Math.round(Math.random() * (60 + 1))} * * * * *`)
console.log('Startup: Checking if IPFS is running')
try {
await (await this.self.ipfs.id()).id
} catch {
throw new Error("IPFS Daemon Not Available. Please run IPFS.")
}

the generated config wouldn't be saved, and the user couldn't modify it to change their settings. This awaits for the initialization to be finished fixing the issue and letting the config be saved and the user can modify it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant