Commit 77d24ab1 authored by Bitcoin Please's avatar Bitcoin Please

Cleanup for deployment.

parent e75e09df
......@@ -47,20 +47,18 @@ const updateMeta = async ({ commit, getters }, _meta) => {
* with a key ONLY know to this profile.
*/
const encrypted = _encrypt(JSON.stringify(_meta), key)
console.log('UPDATE META (encrypted):', encrypted)
// console.log('UPDATE META (encrypted):', encrypted)
const signedPkg = getters.getSignedMessage(encrypted)
// console.log('SIGNED PACKAGE', signedPkg)
/* Set api target. */
const target = 'http://localhost:6767/v1/meta'
// const target = 'https://api.causes.cash/v1/meta'
const target = 'https://api.causes.cash/v1/meta'
const result = await superagent
/* Call api. */
await superagent
.post(target)
.send(signedPkg)
console.log('RESULT', result)
}
/* Export module. */
......
......@@ -54,18 +54,20 @@ const getMeta = async (state, getters, rootState, rootGetters) => {
// console.log('GET SIGNED MESSAGE (address):', address)
/* Set target. */
const target = `http://localhost:6767/v1/meta/${address}`
// const target = `https://api.causes.cash/v1/meta/${address}`
const target = `https://api.causes.cash/v1/meta/${address}`
/* Set contract path. */
const response = await superagent.get(target)
console.log('GET META', response)
// console.log('GET META', response)
/* Request decryption key. */
const key = getters.getMasterSeed
console.log('MASTER SEED (key)', key)
console.log('GET META (decrypted)', _decrypt(response, key))
return null
/* Decrypt metadata. */
const meta = _decrypt(response, key)
/* Return metadata. */
return meta
} else {
/* Return metadata. */
return msgpack.decode(Buffer.from(state.meta, 'hex'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment