-
Notifications
You must be signed in to change notification settings - Fork 101
Updated Handler for appencryptionrequest, added z_functions ported from React Native Verus #228
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
Closed
iamahmedshahh
wants to merge
12
commits into
VerusCoin:generic-request-changes
from
iamahmedshahh:ka_agree
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
aed6b0e
Use ka_agree branch of 'react-native-verus'
who-biz fb6bbe7
Add lines to keys.js for testing of ka_agree
who-biz c638fb5
importing and making a wrapper for zgetencrpytionaddress, encrypt and…
iamahmedshahh fce05c2
add identity validation for request/response signers
iamahmedshahh 7685be2
-- importing functions called from react native verus in callcreators
iamahmedshahh 005428a
- updated appEncryptionRequest handlers, following the existing style…
iamahmedshahh 50e5218
-- removed console logs
iamahmedshahh 77563fd
minor updates and corrections
iamahmedshahh 691319f
- removed context from the parameters of the handleAppEncryptionReque…
iamahmedshahh 076db10
get esk from activeAccount
iamahmedshahh 95f5fb6
change derivationParams from seed to spendingKey
iamahmedshahh 257fc5f
Changes based on code review:
iamahmedshahh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
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. Changes to this file should be removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
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 delete tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| }; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
25
src/utils/api/channels/dlight/requests/zGetEncryptionAddress.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please undo this change, we should point to the VerusCoin repo and pointing to biz's repo was temporary
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.
I dont see it pointing to any repo except for the
./m2/repository