forked from tornadocash/classic-ui
fix: remove rudiments
This commit is contained in:
parent
dea8043806
commit
1f12d5eccd
@ -11,8 +11,8 @@ export async function getAccountFromAddress({ getters, rootGetters }, address) {
|
|||||||
|
|
||||||
const events = await getEventsFromBlockPart({
|
const events = await getEventsFromBlockPart({
|
||||||
netId,
|
netId,
|
||||||
currentBlockNumber,
|
|
||||||
address,
|
address,
|
||||||
|
currentBlockNumber,
|
||||||
echoContract: getters.echoContract
|
echoContract: getters.echoContract
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -22,15 +22,12 @@ export async function getAccountFromAddress({ getters, rootGetters }, address) {
|
|||||||
throw new Error(`Please setup account, account doesn't exist for this address`)
|
throw new Error(`Please setup account, account doesn't exist for this address`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = lastEvent.encryptedAccount ? lastEvent.encryptedAccount : lastEvent.returnValues.data
|
const encryptedMessage = unpackEncryptedMessage(lastEvent.encryptedAccount)
|
||||||
const backup = lastEvent.address ? lastEvent.address : lastEvent.returnValues.who
|
|
||||||
|
|
||||||
const encryptedMessage = unpackEncryptedMessage(data)
|
|
||||||
const encryptedKey = Buffer.from(JSON.stringify(encryptedMessage)).toString('hex')
|
const encryptedKey = Buffer.from(JSON.stringify(encryptedMessage)).toString('hex')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
backup,
|
encryptedKey,
|
||||||
encryptedKey
|
backup: lastEvent.address
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new Error(`Method getAccountFromAddress has error: ${err.message}`)
|
throw new Error(`Method getAccountFromAddress has error: ${err.message}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user