mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-01-27 11:44:50 +00:00
fix pledges profile relationship import
fix pledgeState type error
This commit is contained in:
parent
8ae34629cc
commit
c5b734b175
@ -6,6 +6,7 @@ import { getProfilesById } from './profiles'
|
||||
|
||||
const createPledge = (pledge, data, profiles) => {
|
||||
const { id, owner, amount, blockNumber, token, commitTime, nDelegates, pledgeState, intendedProject } = data
|
||||
console.log({data})
|
||||
const profile = profiles.find(p => p.idProfile == owner)
|
||||
pledge.pledgeId = Number(id)
|
||||
pledge.owner = Number(owner)
|
||||
@ -13,7 +14,7 @@ const createPledge = (pledge, data, profiles) => {
|
||||
pledge.token = token
|
||||
pledge.commitTime = Number(commitTime)
|
||||
pledge.nDelegates = Number(nDelegates)
|
||||
pledge.pledgeState = pledgeState
|
||||
pledge.pledgeState = Number(pledgeState)
|
||||
pledge.intendedProject = Number(intendedProject)
|
||||
pledge.blockNumber = Number(blockNumber)
|
||||
pledge.profile.set(profile)
|
||||
|
@ -51,8 +51,10 @@ class App extends React.Component {
|
||||
// not running in parallel due to possible metamask / infura limitation
|
||||
await getAndAddLpEvents()
|
||||
await getAndAddVaultEvents()
|
||||
await getAndAddPledges()
|
||||
|
||||
// Profiles must be loaded before pledges to set profile on pledge model
|
||||
await addFormattedProfiles()
|
||||
await getAndAddPledges()
|
||||
await updateStalePledges()
|
||||
this.setState({ loading: false })
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user