Skip to content

Commit

Permalink
migration: move default endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmix committed Jun 27, 2024
1 parent 50d143c commit 979ac18
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
19 changes: 19 additions & 0 deletions src/config/migrations/01.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const version = '1' // make future versions a number plz

export function migrate (data = {}) {
try {
const migratedData = {
...data,
endpoints: {
// @ts-ignore
...data.endpoints,
'test-net': 'wss://testnet.entropy.xyz'
},
'migration-version': version,
}
return migratedData
} catch (e) {
console.error(`error in migration ${version}: e.message`)
}
return data
}
4 changes: 3 additions & 1 deletion src/config/migrations/index.ts
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
4 changes: 2 additions & 2 deletions tests/testing-utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/dev/testing-utils.mjs"
// import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/testing"
// @ts-ignore
import { spinNetworkUp, spinNetworkDown, } from "@entropyxyz/sdk/testing"
import * as readline from 'readline'
import { randomBytes } from 'crypto'

Expand Down

0 comments on commit 979ac18

Please sign in to comment.