Added the ability to share account data
This commit is contained in:
@@ -2,7 +2,6 @@ import resolveConfig from 'tailwindcss/resolveConfig';
|
||||
import {cryptography, transactions} from '@liskhq/lisk-client';
|
||||
import {removeFeatureAssetSchema, setFeatureAssetSchema} from './Schemas';
|
||||
import {statusMap} from "../shared/statusMap";
|
||||
import {labelMap} from "../shared/labelMap";
|
||||
|
||||
export const tailwindConfig = () => {
|
||||
// Tailwind config
|
||||
@@ -49,6 +48,17 @@ export const encryptAccountData = (data = [], passPhrase = '', pubKey = '') => {
|
||||
})
|
||||
}
|
||||
|
||||
export const encryptSharedData = (data = [], passPhrase = '', pubKey = '') => {
|
||||
return data.map((item)=> {
|
||||
let value = cryptography.encryptMessageWithPassphrase(item.seed + ":" + item.value, passPhrase, pubKey);
|
||||
return {
|
||||
label: item.key,
|
||||
value: value.encryptedMessage,
|
||||
value_nonce: value.nonce,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const hashAccountData = (data = [], oldData = [], hashMap = {}) => {
|
||||
const accountMap = data.reduce((acc, item) => ({
|
||||
...acc,
|
||||
|
||||
Reference in New Issue
Block a user