-
Notifications
You must be signed in to change notification settings - Fork 54
Add Monero #1027
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
base: master
Are you sure you want to change the base?
Add Monero #1027
Changes from all commits
05f9aa2
83c859f
2b43139
53dda68
3c754bf
87320ef
47cdab5
1caf499
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", | ||
|
|
@@ -158,7 +160,7 @@ | |
| "chai": "^4.2.0", | ||
| "clipanion": "^4.0.0-rc.2", | ||
| "crypto-browserify": "^3.12.0", | ||
| "edge-core-js": "^2.42.0", | ||
| "edge-core-js": "2.42.1-beta.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Peer dependency pins unstable pre-release versionMedium Severity
Additional Locations (1)Triggered by team rule: Use review sub agents |
||
| "esbuild-loader": "^2.20.0", | ||
| "eslint": "^8.19.0", | ||
| "eslint-config-standard-kit": "0.15.1", | ||
|
|
@@ -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", | ||
|
|
@@ -199,6 +202,7 @@ | |
| "webpack-dev-server": "^4.11.1" | ||
| }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please align |
||
| "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" | ||
|
|
||
| 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 |
| 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 | ||
|
|
@@ -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, | ||
|
|
@@ -20,9 +20,12 @@ export interface ZanoSyncTracker extends SyncTracker { | |
| } | ||
|
|
||
| /** | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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] | ||
|
|
@@ -61,7 +64,7 @@ export function makeZanoSyncTracker(engine: SyncEngine): ZanoSyncTracker { | |
| lastTotalRatio = status.totalRatio | ||
| } | ||
|
|
||
| const out: ZanoSyncTracker = { | ||
| const out: WeightedSyncTracker = { | ||
| resetSync() { | ||
| balanceRatio = 0 | ||
| blockRatio = 0 | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edge-core-jswas 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.