Skip to content
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

- changed: *Breaking change* Change to use Edge LWS servers. Must specify edgeApiKey in plugin options, instead of apiKey

## 1.5.1 (2025-07-03)

- fixed: Fix `getFreshAddress` to return a non-empty `publicAddress` when calling immediately after creating a wallet.
Expand Down
7 changes: 2 additions & 5 deletions src/MoneroEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class MoneroEngine implements EdgeCurrencyEngine {
const initOptions = asMoneroInitOptions(env.initOptions ?? {})
const { networkInfo } = tools

this.apiKey = initOptions.apiKey
this.apiKey = initOptions.edgeApiKey
this.io = env.io
this.log = opts.log
this.engineOn = false
Expand All @@ -110,7 +110,7 @@ export class MoneroEngine implements EdgeCurrencyEngine {
this.currencyInfo = currencyInfo
this.currencyTools = tools
this.myMoneroApi = new MyMoneroApi(tools.cppBridge, {
apiKey: initOptions.apiKey,
apiKey: initOptions.edgeApiKey,
apiServer: networkInfo.defaultServer,
fetch: env.io.fetch,
nettype: networkInfo.nettype
Expand All @@ -134,9 +134,6 @@ export class MoneroEngine implements EdgeCurrencyEngine {
)
}

// Hard coded for testing
// this.walletInfo.keys.moneroKey = '389b07b3466eed587d6bdae09a3613611de9add2635432d6cd1521af7bbc3757'
// this.walletInfo.keys.moneroAddress = '0x9fa817e5A48DD1adcA7BEc59aa6E3B1F5C4BeA9a'
this.edgeTxLibCallbacks = callbacks
this.walletLocalDisklet = walletLocalDisklet

Expand Down
4 changes: 2 additions & 2 deletions src/MoneroTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type {
import CppBridge from 'react-native-mymonero-core/src/CppBridge'
import { parse, serialize } from 'uri-js'

import { currencyInfo } from './moneroInfo'
import { currencyInfo, MONERO_LWS_SERVER } from './moneroInfo'
import type { MoneroNetworkInfo, PrivateKeys, PublicKeys } from './moneroTypes'

function getDenomInfo(denom: string): EdgeDenomination | undefined {
Expand All @@ -37,7 +37,7 @@ export class MoneroTools {
io: EdgeIo
log: EdgeLog
networkInfo: MoneroNetworkInfo = {
defaultServer: 'https://edge.mymonero.com:8443',
defaultServer: MONERO_LWS_SERVER,
nettype: 'MAINNET'
}

Expand Down
4 changes: 3 additions & 1 deletion src/moneroInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import type { EdgeCurrencyInfo } from 'edge-core-js/types'

import type { MoneroUserSettings } from './moneroTypes.js'

export const MONERO_LWS_SERVER = 'https://monerolws1.edge.app'

const defaultSettings: MoneroUserSettings = {
enableCustomServers: false,
moneroLightwalletServer: 'https://edge.mymonero.com:8443'
moneroLightwalletServer: MONERO_LWS_SERVER
}

export const currencyInfo: EdgeCurrencyInfo = {
Expand Down
2 changes: 1 addition & 1 deletion src/moneroTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type { EdgeCurrencyTools, EdgeWalletInfo } from 'edge-core-js'
import type { Nettype } from 'react-native-mymonero-core'

export const asMoneroInitOptions = asObject({
apiKey: asOptional(asString, '')
edgeApiKey: asOptional(asString, '')
})

export interface MoneroNetworkInfo {
Expand Down
Loading