Skip to content

Commit

Permalink
Fix: failed originations
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Oct 2, 2023
1 parent 4b4d2f2 commit c8c95a5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion internal/parsers/contract/alpha.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func (p *Alpha) Parse(ctx context.Context, operation *operation.Operation, store
}

store.AddContracts(&contract)
store.AddAccounts(contract.Account)
return nil
}

Expand Down
1 change: 0 additions & 1 deletion internal/parsers/contract/babylon.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func (p *Babylon) Parse(ctx context.Context, operation *operation.Operation, sto
}

store.AddContracts(&contract)
store.AddAccounts(contract.Account)
return nil
}

Expand Down
1 change: 0 additions & 1 deletion internal/parsers/contract/hangzhou.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func (p *Hangzhou) Parse(ctx context.Context, operation *operation.Operation, st
}

store.AddContracts(&contract)
store.AddAccounts(contract.Account)
return nil
}

Expand Down
1 change: 0 additions & 1 deletion internal/parsers/contract/jakarta.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (p *Jakarta) Parse(ctx context.Context, operation *operation.Operation, sto
}

store.AddContracts(&contract)
store.AddAccounts(contract.Account)
return nil
}

Expand Down
1 change: 1 addition & 0 deletions internal/parsers/migrations/implicit.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (p *ImplicitParser) origination(ctx context.Context, implicit noderpc.Impli
Kind: types.MigrationKindBootstrap,
Contract: *contracts[i],
})
store.AddAccounts(origination.Destination)
break
}
}
Expand Down
11 changes: 5 additions & 6 deletions internal/parsers/migrations/vesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ func (p *VestingParser) Parse(ctx context.Context, data noderpc.ContractData, he
return err
}

store.AddAccounts(
vestingOperation.Source,
vestingOperation.Destination,
vestingOperation.Delegate,
)

contracts := store.ListContracts()
for i := range contracts {
if contracts[i].Account.Address == address {
Expand All @@ -79,6 +73,11 @@ func (p *VestingParser) Parse(ctx context.Context, data noderpc.ContractData, he
Kind: types.MigrationKindBootstrap,
Contract: *contracts[i],
})
store.AddAccounts(
vestingOperation.Source,
vestingOperation.Destination,
vestingOperation.Delegate,
)
break
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/parsers/operations/origination.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (p Origination) Parse(ctx context.Context, data noderpc.Operation, store pa
if err := p.appliedHandler(ctx, data, &origination, store); err != nil {
return err
}
store.AddAccounts(origination.Destination)
}

store.AddOperations(&origination)
Expand Down

0 comments on commit c8c95a5

Please sign in to comment.