Skip to content
Closed
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: 1 addition & 1 deletion android/gradle.properties
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please undo this change, we should point to the VerusCoin repo and pointing to biz's repo was temporary

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I dont see it pointing to any repo except for the ./m2/repository

Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ AsyncStorage_next_roomVersion=2.4.2

# Uncomment the following, replacing with absolute path for maven artifacts
# Generated by `./gradlew publishToMavenLocal' called from 'verus-android-wallet-sdk` root
REACT_NATIVE_MAVEN_LOCAL_REPO=/home/biz/.m2/repository/
REACT_NATIVE_MAVEN_LOCAL_REPO=/home/ahmed/.m2/repository/
33 changes: 17 additions & 16 deletions package.json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes to this file should be removed

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"debug-android": "cd android && ./gradlew assembleDebug --stacktrace && cd ..",
"test": "jest",
"lint": "eslint .",
"update-verus-libs": "yarn remove verus-typescript-primitives && yarn add 'git+https://github.com/VerusCoin/verus-typescript-primitives.git' && yarn remove @bitgo/utxo-lib && yarn add 'git+https://github.com/VerusCoin/BitGoJS.git#utxo-lib-verus' && yarn remove verusd-rpc-ts-client && yarn add 'git+https://github.com/VerusCoin/verusd-rpc-ts-client.git' && yarn remove verusid-ts-client && yarn add 'git+https://github.com/VerusCoin/verusid-ts-client.git'"
"update-verus-libs": "yarn remove verus-typescript-primitives && yarn add 'git+https://github.com/michaeltout/verus-typescript-primitives#generic-signed-request' && yarn remove @bitgo/utxo-lib && yarn add 'git+https://github.com/VerusCoin/BitGoJS.git#utxo-lib-verus' && yarn remove verusd-rpc-ts-client && yarn add 'git+https://github.com/VerusCoin/verusd-rpc-ts-client.git' && yarn remove verusid-ts-client && yarn add 'git+https://github.com/VerusCoin/verusid-ts-client.git'"
},
"dependencies": {
"@bitgo/blake2b-wasm": "https://github.com/VerusCoin/blake2b-wasm/",
Expand Down Expand Up @@ -98,7 +98,7 @@
"react-native-udp": "4.1.5",
"react-native-url-polyfill": "1.3.0",
"react-native-vector-icons": "git+https://github.com/VerusCoin/react-native-vector-icons.git",
"react-native-verus": "git+https://github.com/who-biz/react-native-zcash.git#maven-verus",
"react-native-verus": "git+https://github.com/who-biz/react-native-verus.git#ka_agree",
"react-native-vision-camera": "4.3.1",
"react-redux": "8.0.2",
"readable-stream": "1.0.33",
Expand All @@ -118,7 +118,7 @@
"varuint-bitcoin": "1.0.4",
"version_compare": "0.0.3",
"verus-pay-utils": "git+https://github.com/VerusCoin/verus-pay-utils.git",
"verus-typescript-primitives": "git+https://github.com/VerusCoin/verus-typescript-primitives.git",
"verus-typescript-primitives": "git+https://github.com/michaeltout/verus-typescript-primitives#generic-signed-request",
"verus-zkedid-utils": "git+https://github.com/VerusCoin/verus-zkedid-utils.git",
"verusd-rpc-ts-client": "git+https://github.com/VerusCoin/verusd-rpc-ts-client.git",
"verusid-ts-client": "git+https://github.com/VerusCoin/verusid-ts-client.git",
Expand Down Expand Up @@ -225,8 +225,8 @@
"decode-uri-component": "0.2.2",
"@sideway/formula": "3.0.1",
"@babel/core": "7.25.7",
"blake2b-wasm": "https://github.com/VerusCoin/blake2b-wasm/",
"@bitgo/blake2b-wasm": "https://github.com/VerusCoin/blake2b-wasm/",
"blake2b-wasm": "git+https://github.com/VerusCoin/blake2b-wasm.git",
"@bitgo/blake2b-wasm": "git+https://github.com/VerusCoin/blake2b-wasm.git",
"browserify-sign": "4.2.2",
"secp256k1": "3.8.1"
},
Expand Down Expand Up @@ -264,29 +264,30 @@
"tls": false
},
"browser": {
"zlib": "browserify-zlib",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"_stream_readable": "readable-stream/readable",
"_stream_transform": "readable-stream/transform",
"_stream_writable": "readable-stream/writable",
"console": "console-browserify",
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"dgram": "react-native-udp",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"fs": "react-native-level-fs",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"net": "react-native-tcp",
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"dgram": "react-native-udp",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tls": false,
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
}
"zlib": "browserify-zlib"
},
"packageManager": "yarn@4.10.3"
}
6 changes: 6 additions & 0 deletions src/VerusMobile.js
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please delete tests

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Linking
} from "react-native";
import Modal from './components/Modal'
import { runAllTests } from '../src/containers/DeepLink/AppEncryptionRequest/appEncryptionTest';
import RootStackScreens from './containers/RootStack/RootStackScreens';
import {
fetchUsers,
Expand Down Expand Up @@ -165,6 +166,11 @@ class VerusMobile extends React.Component {
if (ENABLE_VERUS_IDENTITIES) {
this.props.dispatch(requestSeedData());
}

setTimeout(() => {
console.log('Running AppEncryption tests...');
runAllTests();
}, 6000);
}

render() {
Expand Down
3 changes: 3 additions & 0 deletions src/utils/api/channels/dlight/callCreators.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export * from './requests/getInfo'
export * from './requests/getTransactions'
export * from './requests/preflightPrivateTransaction'
export * from './requests/sendPrivateTransaction'
export * from './requests/encrypt'
export * from './requests/decrypt'
export * from './request/zGetEncryptionAddress'

/**
* Makes a request to the light daemon client
Expand Down
25 changes: 25 additions & 0 deletions src/utils/api/channels/dlight/requests/decrypt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Tools } from 'react-native-verus';
import ApiException from '../../../../errors/apiError';
import { DLIGHT_PRIVATE } from '../../../../constants/intervalConstants';


export const decryptVerusMessage = async (alias, params) => {
try {
const plaintext = await Tools.decryptVerusMessage(
params.fvkHex || null,
params.epkHex || null,
params.ciphertextHex,
params.sskHex || null
);

return {
result: plaintext,
err: false
};
} catch (e) {
return {
err: true,
result: new ApiException(e.message, e.data, alias, DLIGHT_PRIVATE, e.code)
};
}
}
20 changes: 20 additions & 0 deletions src/utils/api/channels/dlight/requests/encrypt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Tools } from 'react-native-verus';
import ApiException from '../../../../errors/apiError';
import { DLIGHT_PRIVATE } from '../../../../constants/intervalConstants';


export const encryptVerusMessage = async (alias, address, message, returnSsk = false) => {
try {
const payload = await Tools.encryptVerusMessage(address, message, returnSsk);

return {
result: payload,
err: false
};
} catch (e) {
return {
err: true,
result: new ApiException(e.message, e.data, alias, DLIGHT_PRIVATE, e.code)
};
}
}
25 changes: 25 additions & 0 deletions src/utils/api/channels/dlight/requests/zGetEncryptionAddress.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Tools } from 'react-native-verus';
import ApiException from '../../../../errors/apiError'
import { DLIGHT_PRIVATE } from '../../../../constants/intervalConstants'


export const z_getencryptionaddress = async (alias, params) => {
try {
const keys = await Tools.getVerusEncryptionAddress(
params.seed || null,
params.spendingKey || null,
params.fromId || null,
params.toId || null,
params.hdIndex || 0,
params.encryptionIndex || 0,
params.returnSecret || false
);

return { result: keys };
} catch (e) {
return {
err: true,
result: new ApiException(e.message, e.data, alias, DLIGHT_PRIVATE, e.code)
}
}
}
Loading