-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add swap-endpoint migration (#298)
* feat: add swap-endpoint migration * refactor: rename to blockchainRpcEndpoint * refactor: rename to blockchainRpcEndpoint
- Loading branch information
Showing
5 changed files
with
42 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { configYamlExists, readConfigYaml, writeConfigYaml } from './config' | ||
|
||
export function runMigrations() { | ||
if (!configYamlExists()) { | ||
return | ||
} | ||
|
||
const config = readConfigYaml() | ||
|
||
// TODO: remove this after 1.0.0 release | ||
// this is a migration path for pioneers | ||
// who helped testing the early versions | ||
if (!config.password) { | ||
writeConfigYaml({ password: 'Test' }) | ||
} | ||
|
||
if (config['swap-endpoint'] && !config['blockchain-rpc-endpoint']) { | ||
writeConfigYaml({ 'blockchain-rpc-endpoint': config['swap-endpoint'] }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters