Skip to content

Commit

Permalink
detect penumbra-1 chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei committed Aug 18, 2024
1 parent 9783a82 commit 70ed559
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/context/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FullViewingKey, WalletId } from '@penumbra-zone/protobuf/penumbra/core/
import { ChainRegistryClient } from '@penumbra-labs/registry';
import { AppParameters } from '@penumbra-zone/protobuf/penumbra/core/app/v1/app_pb';
import { AssetId } from '@penumbra-zone/protobuf/penumbra/core/asset/v1/asset_pb';
import genesisBlock from '../../../apps/extension/public/genesis.json';
import genesisBlock from 'chrome-extension/public/genesis.json';
import { JsonObject } from '@bufbuild/protobuf';

export interface ServicesConfig {
Expand Down Expand Up @@ -36,7 +36,9 @@ export class Services implements ServicesInterface {
});
}
void this.walletServicesPromise.then(({ blockProcessor }) =>
blockProcessor.sync(genesisBlock as JsonObject),
this.config.chainId === 'penumbra-1'
? blockProcessor.sync(genesisBlock as JsonObject)
: blockProcessor.sync(),
);
return this.walletServicesPromise;
}
Expand Down

0 comments on commit 70ed559

Please sign in to comment.