Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions ocp/worker/currency/launcher/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,9 @@ func (p *runtime) markCurrencyMetadataAbandoned(ctx context.Context, record *cur
return p.data.SaveCurrencyMetadata(ctx, record)
}

func (p *runtime) putInitialReserveState(ctx context.Context, record *currency.MetadataRecord) error {
func (p *runtime) putInitialReserveState(_ context.Context, _ *currency.MetadataRecord) error {
// Note: The live reserve state is initialized by the swap worker on initial purchase

err := p.reserveStore.PutHistoricalReserve(ctx, &currency.ReserveRecord{
Mint: record.Mint,
SupplyFromBonding: 0,
Time: record.CreatedAt,
})
if err != nil && err != currency.ErrExists {
return errors.Wrap(err, "error putting initial historical reserve state")
}

return nil
}

Expand All @@ -148,15 +139,6 @@ func (p *runtime) putInitialHolderCount(ctx context.Context, record *currency.Me
return errors.Wrap(err, "error putting initial live holder count")
}

err = p.holderStore.PutHistoricalHolderCount(ctx, &currency.HolderCountRecord{
Mint: record.Mint,
HolderCount: 0,
Time: record.CreatedAt,
})
if err != nil && err != currency.ErrExists {
return errors.Wrap(err, "error putting initial historical holder count")
}

return nil
}

Expand Down
Loading