Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default API key handling #629

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- fixed: Accept `''` to select the default API key.

## 2.20.2 (2024-11-21)

- fixed: Do not error when changing the PIN on accounts with children.
Expand Down
5 changes: 4 additions & 1 deletion src/core/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export async function makeContext(
const { io } = ios
const {
airbitzSupport = false,
apiKey = '4248c1bf41e53b840a5fdb2c872dd3ade525e66d',
apiSecret,
appId = '',
authServer = 'https://login.edge.app/api',
Expand All @@ -46,6 +45,10 @@ export async function makeContext(
skipBlockHeight = false,
syncServer
} = opts
let { apiKey } = opts
if (apiKey == null || apiKey === '') {
apiKey = '4248c1bf41e53b840a5fdb2c872dd3ade525e66d'
}
const infoServers =
typeof infoServer === 'string'
? [infoServer]
Expand Down
Loading