-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration: move default endpoint (#143)
* migration: move default endpoint * fixups
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export const version = 1 | ||
|
||
export function migrate (data = {}) { | ||
try { | ||
const migratedData = { | ||
...data, | ||
endpoints: { | ||
// @ts-ignore | ||
...data.endpoints, | ||
'test-net': 'wss://testnet.entropy.xyz' | ||
} | ||
} | ||
return migratedData | ||
} catch (e) { | ||
console.error(`error in migration ${version}: e.message`) | ||
} | ||
return data | ||
} |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import * as migration00 from './00' | ||
import * as migration01 from './01' | ||
|
||
const migrations = [ | ||
migration00 | ||
migration00, | ||
migration01, | ||
] | ||
|
||
export default migrations |
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