Skip to content

Commit

Permalink
Fabo/1791 fix voyager init (#1794)
Browse files Browse the repository at this point in the history
* Fixed a problem with initializing the Voyager config dir
* fixed tests by adding copyFile to fs extra mock
  • Loading branch information
faboweb authored and sabau committed Jan 4, 2019
1 parent 8c78fe1 commit 97a2d98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [\#1572](https://github.com/cosmos/voyager/issues/1572) Fixed scroll bug when switching between tabs @jbibla
- [\#1749](https://github.com/cosmos/voyager/issues/1749) Fixed proposal tally update after voting @fedekunze
- [\#1765](https://github.com/cosmos/voyager/pull/1765) Fixed proposal deposit update after submitting a deposit @fedekunze
- [\#1791](https://github.com/cosmos/voyager/pull/1791) Fixed a problem with initializing the Voyager config dir @faboweb

## [0.10.7] - 2018-10-10

Expand Down
13 changes: 12 additions & 1 deletion app/src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,18 @@ async function main() {

// copy predefined genesis.json and config.toml into root
fs.accessSync(networkPath) // crash if invalid path
fs.copySync(networkPath, root)
await fs.copyFile(
join(networkPath, `config.toml`),
join(root, `config.toml`)
)
await fs.copyFile(
join(networkPath, `gaiaversion.txt`),
join(root, `gaiaversion.txt`)
)
await fs.copyFile(
join(networkPath, `genesis.json`),
join(root, `genesis.json`)
)

fs.writeFileSync(appVersionPath, pkgVersion)
}
Expand Down
1 change: 1 addition & 0 deletions test/unit/helpers/fs-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function mockFsExtra(fileSystem = {}) {
}
create(to, fsExtraMock.fs, file)
},
copyFile: (from, to) => fsExtraMock.copy(from, to),
ensureFile: path => {
let { file } = get(path, fsExtraMock.fs)
if (file === null) {
Expand Down

0 comments on commit 97a2d98

Please sign in to comment.