Skip to content

Commit

Permalink
migration: move default endpoint (#143)
Browse files Browse the repository at this point in the history
* migration: move default endpoint

* fixups
  • Loading branch information
mixmix authored Jun 27, 2024
1 parent 50d143c commit 7896442
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/config/migrations/01.ts
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
}
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 7896442

Please sign in to comment.