store eventId on profile
This commit is contained in:
parent
4ec9180006
commit
ade8b1bdfc
|
@ -6,6 +6,7 @@ export default class Profile extends LiquidModel {
|
|||
static table = 'profiles'
|
||||
|
||||
@field('addr') addr
|
||||
@field('event_id') eventId
|
||||
@field('canceled') canceled
|
||||
@field('commit_time') commitTime
|
||||
@field('type') type
|
||||
|
|
|
@ -6,15 +6,16 @@ export default appSchema({
|
|||
tableSchema({
|
||||
name: 'lp_events',
|
||||
columns: [
|
||||
{ name: 'event_id', type: 'string' },
|
||||
{ name: 'address', type: 'string' },
|
||||
{ name: 'event', type: 'string' },
|
||||
{ name: 'event_id', type: 'string' },
|
||||
{ name: 'block_number', type: 'number', isIndexed: true },
|
||||
]
|
||||
}),
|
||||
tableSchema({
|
||||
name: 'profiles',
|
||||
columns: [
|
||||
{ name: 'event_id', type: 'string' },
|
||||
{ name: 'addr', type: 'string' },
|
||||
{ name: 'canceled', type: 'boolean' },
|
||||
{ name: 'commit_time', type: 'number' },
|
||||
|
|
|
@ -47,10 +47,11 @@ const getPastVaultEvents = async (event, raw = false) => {
|
|||
const { getPledgeAdmin } = LiquidPledging.methods
|
||||
export const formatFundProfileEvent = async event => {
|
||||
const lookup = lookups[event.event]
|
||||
const { returnValues: { url, idProject } } = event
|
||||
const { id, returnValues: { url, idProject } } = event
|
||||
const idProfile = event.returnValues[lookup.id]
|
||||
const { addr, commitTime, name, canceled } = await getPledgeAdmin(idProfile).call()
|
||||
return {
|
||||
id,
|
||||
idProfile,
|
||||
idProject,
|
||||
url,
|
||||
|
|
Loading…
Reference in New Issue