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
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
29 changes: 22 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -141,7 +143,7 @@
"chai": "^4.2.0",
"clipanion": "^4.0.0-rc.2",
Comment thread
peachbits marked this conversation as resolved.
"crypto-browserify": "^3.12.0",
"edge-core-js": "^2.42.0",
"edge-core-js": "2.46.0",
"esbuild-loader": "^2.20.0",
"eslint": "^8.19.0",
"eslint-config-standard-kit": "0.15.1",
Expand All @@ -165,6 +167,7 @@
"prettier": "^2.2.0",
"process": "^0.11.10",
"querystring": "^0.2.1",
"react-native-monero": "0.1.0",
"react-native-piratechain": "0.5.0",
"react-native-zano": "^0.2.7",
"react-native-zcash": "0.10.1",
Expand All @@ -182,6 +185,7 @@
"webpack-dev-server": "^5.2.4"
},
Comment thread
peachbits marked this conversation as resolved.
"peerDependencies": {
"react-native-monero": "^0.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 {
}

/**
Comment thread
peachbits marked this conversation as resolved.
* 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