Skip to content

Commit

Permalink
fix: chainId init
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlescano committed Sep 14, 2024
1 parent 8871e2c commit a938543
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 0 additions & 5 deletions packages/builder/src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ export class CannonStorage extends EventEmitter {

const deployInfo: DeploymentInfo = await this.readBlob(uri);

// Some old packages do not have the chainId saved in artifacts and it is expected
if (!deployInfo.chainId) {
deployInfo.chainId = chainId;
}

return deployInfo;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/builder/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export type DeploymentInfo = {
miscUrl: string;

// EVM chain which this deployment is for
chainId?: number;
chainId: number;
};

export type DeploymentManifest = {
Expand Down
11 changes: 8 additions & 3 deletions packages/website/src/features/Deploy/QueueFromGitOpsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ import {
Stack,
} from '@chakra-ui/react';
import { useConnectModal } from '@rainbow-me/rainbowkit';
import { ChainBuilderContext, PackageReference } from '@usecannon/builder';
import {
ChainBuilderContext,
PackageReference,
DeploymentInfo,
} from '@usecannon/builder';
import _ from 'lodash';
import NextLink from 'next/link';
import { useRouter } from 'next/navigation';
Expand Down Expand Up @@ -255,15 +259,16 @@ function QueueFromGitOps() {
const uploadToPublishIpfs = useCannonWriteDeployToIpfs(
buildInfo.buildResult?.runtime,
cannonDefInfo.def
? {
? ({
generator: `cannon website ${pkg.version}`,
timestamp: Math.floor(Date.now() / 1000),
def: cannonDefInfo.def.toJson(),
state: buildInfo.buildResult?.state || {},
options: prevCannonDeployInfo.pkg?.options || {},
meta: prevCannonDeployInfo.pkg?.meta,
miscUrl: prevCannonDeployInfo.pkg?.miscUrl || '',
}
chainId,
} satisfies DeploymentInfo)
: undefined,
prevCannonDeployInfo.metaUrl
);
Expand Down

0 comments on commit a938543

Please sign in to comment.