Skip to content
Open
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
1 change: 1 addition & 0 deletions cli/cliContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export async function makeCliEngine(
enabledTokenIds: settings.enabledTokens[pluginId] ?? [],
log,
userSettings: {},
walletSettings: {},
walletLocalDisklet: navigateDisklet(disklet, pluginId),
walletLocalEncryptedDisklet: navigateDisklet(
disklet,
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"/LICENSE",
"/package.json",
"/README.md",
"/rn-monero.d.ts",
"/rn-monero.js",
"/rn-piratechain.d.ts",
"/rn-piratechain.js",
"/rn-zano.d.ts",
Expand Down Expand Up @@ -158,7 +160,7 @@
"chai": "^4.2.0",
"clipanion": "^4.0.0-rc.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edge-core-js was changed from a ranged stable dependency to an exact beta pin. Please confirm this is intentional for merge and, if not, switch back to an agreed stable/ranged version.

"crypto-browserify": "^3.12.0",
"edge-core-js": "^2.42.0",
"edge-core-js": "2.42.1-beta.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer dependency pins unstable pre-release version

Medium Severity

edge-core-js was changed from the ranged stable pin ^2.42.0 to the exact beta pin 2.42.1-beta.0, and react-native-monero-lwsf is declared as v0.1.0 in peerDependencies (with an invalid v prefix) but as 0.1.0-beta.0 in devDependencies. The dev environment therefore tests against a pre-release that does not satisfy the declared peer range, meaning consumers installing the stable peer dep will use an untested version of the library.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by team rule: Use review sub agents

"esbuild-loader": "^2.20.0",
"eslint": "^8.19.0",
"eslint-config-standard-kit": "0.15.1",
Expand All @@ -182,6 +184,7 @@
"prettier": "^2.2.0",
"process": "^0.11.10",
"querystring": "^0.2.1",
"react-native-monero-lwsf": "0.1.0-beta.4",
"react-native-piratechain": "0.5.0",
"react-native-zano": "^0.2.7",
"react-native-zcash": "0.10.1",
Expand All @@ -199,6 +202,7 @@
"webpack-dev-server": "^4.11.1"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please align react-native-monero-lwsf semver across dev/peer deps and remove the v prefix in peer deps ("v0.1.0" -> valid semver/range). The current combination is easy to mis-resolve for consumers.

"peerDependencies": {
"react-native-monero-lwsf": "v0.1.0",
"react-native-piratechain": "v0.5.0",
"react-native-zano": "^0.2.7",
"react-native-zcash": "^0.10.1"
Expand Down
3 changes: 3 additions & 0 deletions rn-monero.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { MoneroIo } from './src/monero/moneroTypes'

export function makeMoneroIo(): MoneroIo
1 change: 1 addition & 0 deletions rn-monero.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { makeMoneroIo } from './lib/monero/moneroIo'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { EdgeSyncStatus } from 'edge-core-js/types'

import { SyncEngine, SyncTracker } from '../common/SyncTracker'
import { SyncEngine, SyncTracker } from './SyncTracker'

const SYNC_PROGRESS_WEIGHT = 0.85
const BALANCE_PROGRESS_WEIGHT = 0.05
Expand All @@ -9,7 +9,7 @@ const TRANSACTION_PROGRESS_WEIGHT = 0.1
/**
* A sync status tracker that works block-by-block.
*/
export interface ZanoSyncTracker extends SyncTracker {
export interface WeightedSyncTracker extends SyncTracker {
updateBalanceRatio: (ratio: number) => void
updateBlockRatio: (
ratio: number,
Expand All @@ -20,9 +20,12 @@ export interface ZanoSyncTracker extends SyncTracker {
}

/**
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Incomplete JSDoc: 'Creates a Sync' is truncated.

Recommendation: Complete the JSDoc description.

* Creates a Sync
* Creates a weighted sync tracker that blends block, balance,
* and history progress into a single ratio.
*/
export function makeZanoSyncTracker(engine: SyncEngine): ZanoSyncTracker {
export function makeWeightedSyncTracker(
engine: SyncEngine
): WeightedSyncTracker {
let balanceRatio = 0
let blockRatio = 0
let blockRatioDetail: [number, number] = [0, 1]
Expand Down Expand Up @@ -61,7 +64,7 @@ export function makeZanoSyncTracker(engine: SyncEngine): ZanoSyncTracker {
lastTotalRatio = status.totalRatio
}

const out: ZanoSyncTracker = {
const out: WeightedSyncTracker = {
resetSync() {
balanceRatio = 0
blockRatio = 0
Expand Down
9 changes: 9 additions & 0 deletions src/declare-modules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,17 @@ declare module 'react-native' {
sourceUri: string
}
}
MoneroLwsfModule: NativeMoneroModule
ZanoModule: NativeZanoModule
}

export class NativeEventEmitter {
constructor(nativeModule?: any)
addListener(
eventType: string,
listener: (event: any) => void
): { remove: () => void }
}
}

declare module 'tronweb' {
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { calibration } from './filecoin/calibrationInfo'
import { filecoin } from './filecoin/filecoinInfo'
import { fio } from './fio/fioInfo'
import { hedera } from './hedera/hederaInfo'
import { monero } from './monero/moneroInfo'
import { piratechain } from './piratechain/piratechainInfo'
import { liberland } from './polkadot/info/liberlandInfo'
import { liberlandtestnet } from './polkadot/info/liberlandTestnetInfo'
Expand Down Expand Up @@ -42,6 +43,7 @@ const plugins = {
hedera,
liberland,
liberlandtestnet,
monero,
piratechain,
polkadot,
ripple,
Expand Down
Loading
Loading