From 3b79e6f55ca001d7a4ca377285d7c5f8dfbda3ba Mon Sep 17 00:00:00 2001 From: Canh Trinh Date: Tue, 6 Feb 2024 15:22:43 -0500 Subject: [PATCH] fix: adapting scripts to prompt for forking and updating schemas --- cli/wizard/commands/list-squid-token/index.ts | 15 +++++++++++++-- registry/schemas/interchain-tokenlist.schema.json | 7 ++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/cli/wizard/commands/list-squid-token/index.ts b/cli/wizard/commands/list-squid-token/index.ts index 887f2ee..1dc2fc4 100644 --- a/cli/wizard/commands/list-squid-token/index.ts +++ b/cli/wizard/commands/list-squid-token/index.ts @@ -16,6 +16,17 @@ const BASE_REPO_URL = export async function listSquidToken() { console.log(chalk.blue("\nGenerating token listing config...\n")); + const didFork = await confirm({ + message: + "Are you running this wizard from a forked repository in your own Github organization?", + default: false, + }); + + if (!didFork) { + console.log(chalk.red("\nPlease fork this repository before continuing\n")); + process.exit(1); + } + const didRegisterViaPortal = await confirm({ message: "Did you register your token via ITS portal?", default: false, @@ -164,7 +175,7 @@ export type InterchainTokenDetailsApiResponse = { axelarChainId: string; tokenId: string; deploymentMessageId: string; - deployer: string; + deployerAddress: string; remoteTokens: RemoteInterchainTokenApiResponse[]; }; @@ -173,7 +184,7 @@ function parseAsInterchainTokenConfig( ): InterchainTokenConfig { return { tokenId: hash.parse(data.tokenId), - deployer: data.deployer, + deployer: data.deployerAddress, originalMinter: data.originalMinterAddress, prettySymbol: data.tokenSymbol, decimals: data.tokenDecimals, diff --git a/registry/schemas/interchain-tokenlist.schema.json b/registry/schemas/interchain-tokenlist.schema.json index b6323e1..dd0638a 100644 --- a/registry/schemas/interchain-tokenlist.schema.json +++ b/registry/schemas/interchain-tokenlist.schema.json @@ -51,7 +51,12 @@ "tokenId": { "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, "deployer": { "$ref": "#/definitions/chains/properties/tokenAddress" }, "originalMinter": { - "$ref": "#/definitions/chains/properties/tokenAddress" + "anyOf": [ + { + "$ref": "#/definitions/chains/properties/tokenAddress" + }, + { "type": "null" } + ] }, "prettySymbol": { "type": "string" }, "decimals": { "type": "integer" },