Skip to content

Commit 3ccd29f

Browse files
committed
Initial currency metadata state in Launch RPC is now WaitingForInitialPurchase
1 parent 7ac2d75 commit 3ccd29f

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

ocp/rpc/currency/launch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (s *currencyServer) Launch(ctx context.Context, req *currencypb.LaunchReque
232232

233233
Alt: base58.Encode(system.ProgramKey[:]), // ALT filled in later due to recent slot requirements
234234

235-
State: currency.MetadataStateUnknown,
235+
State: currency.MetadataStateWaitingForInitialPurchase,
236236

237237
CreatedBy: ownerAccount.PublicKey().ToBase58(),
238238
CreatedAt: creationTs,

ocp/worker/currency/launcher/worker.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ func (p *runtime) handle(ctx context.Context, record *currency.MetadataRecord) e
9393

9494
var err error
9595
switch record.State {
96-
case currency.MetadataStateUnknown:
97-
err = p.handleStateUnknown(ctx, record)
9896
case currency.MetadataStateFundingAuthority:
9997
err = p.handleStateFundingAuthority(ctx, record)
10098
case currency.MetadataStateInitializing:
@@ -109,17 +107,6 @@ func (p *runtime) handle(ctx context.Context, record *currency.MetadataRecord) e
109107
return nil
110108
}
111109

112-
func (p *runtime) handleStateUnknown(ctx context.Context, record *currency.MetadataRecord) error {
113-
err := p.validateCurrencyMetadataState(record, currency.MetadataStateUnknown)
114-
if err != nil {
115-
return err
116-
}
117-
118-
// Nothing to do here currently
119-
120-
return p.markCurrencyMetadataFundingAuthority(ctx, record)
121-
}
122-
123110
// Note: Assumes unique authority per currency
124111
func (p *runtime) handleStateFundingAuthority(ctx context.Context, currencyMetadataRecord *currency.MetadataRecord) error {
125112
err := p.validateCurrencyMetadataState(currencyMetadataRecord, currency.MetadataStateFundingAuthority)

0 commit comments

Comments
 (0)