From 72390315cd93f95c10b6a997f3e4a1eb8c645921 Mon Sep 17 00:00:00 2001 From: Sirapop Date: Wed, 25 Sep 2024 09:42:01 +0700 Subject: [PATCH] chore: remove unused field before save config (#112) --- config/chains.yml | 55 ------------------- package.json | 2 +- .../devnet-amplifier/variables.tf.example | 2 +- .../devnet-verifiers/variables.tf.example | 2 +- terraform/mainnet/variables.tf.example | 2 +- terraform/stagenet/variables.tf.example | 2 +- terraform/testnet/variables.tf.example | 2 +- utils/config.js | 1 + 8 files changed, 7 insertions(+), 61 deletions(-) diff --git a/config/chains.yml b/config/chains.yml index 0d2e1139..eba1d604 100644 --- a/config/chains.yml +++ b/config/chains.yml @@ -2002,61 +2002,6 @@ mainnet: prefix_address: "terra" prefix_chain_ids: - "columbus-" - vm: - flow: - chain_id: 747 - chain_name: "flow" - maintainer_id: "flow" - multisig_prover: - address: "" - voting_verifier: - address: "" - endpoints: - rpc: - - "https://mainnet.evm.nodes.onflow.org" - native_token: - name: "Flow" - symbol: "FLOW" - decimals: 18 - name: "Flow (VM)" - short_name: "FLOW" - image: "/logos/chains/flow.svg" - color: "#00ee8a" - explorer: - name: "Flowscan" - url: "https://evm.flowscan.io" - icon: "/logos/explorers/flow.png" - block_path: "/block/{block}" - address_path: "/address/{address}" - contract_path: "/token/{address}" - transaction_path: "/tx/{tx}" - hedera: - chain_id: 295 - chain_name: "hedera" - maintainer_id: "hedera" - multisig_prover: - address: "" - voting_verifier: - address: "" - endpoints: - rpc: - - "https://mainnet.hashio.io/api" - native_token: - name: "Hedera" - symbol: "HBAR" - decimals: 18 - name: "Hedera (VM)" - short_name: "HBAR" - image: "/logos/chains/hedera.svg" - color: "#000000" - explorer: - name: "Hashscan" - url: "https://hashscan.io/mainnet" - icon: "/logos/explorers/hedera.png" - block_path: "/block/{block}" - address_path: "/account/{address}" - contract_path: "/token/{address}" - transaction_path: "/transaction/{tx}" diff --git a/package.json b/package.json index 4be0e9d0..5f18a9d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "axelarscan-api", - "version": "0.0.84", + "version": "0.0.85", "description": "Axelarscan API", "main": "index.js", "scripts": { diff --git a/terraform/devnet-amplifier/variables.tf.example b/terraform/devnet-amplifier/variables.tf.example index fcc970cf..abf9357c 100644 --- a/terraform/devnet-amplifier/variables.tf.example +++ b/terraform/devnet-amplifier/variables.tf.example @@ -45,7 +45,7 @@ variable "log_level" { variable "app_version" { description = "App version, same as docker image version" - default = "0.0.84" + default = "0.0.85" validation { error_message = "Must be valid semantic version. $Major.$Minor.$Patch" condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version)) diff --git a/terraform/devnet-verifiers/variables.tf.example b/terraform/devnet-verifiers/variables.tf.example index 7dccc214..c34b9e65 100644 --- a/terraform/devnet-verifiers/variables.tf.example +++ b/terraform/devnet-verifiers/variables.tf.example @@ -45,7 +45,7 @@ variable "log_level" { variable "app_version" { description = "App version, same as docker image version" - default = "0.0.84" + default = "0.0.85" validation { error_message = "Must be valid semantic version. $Major.$Minor.$Patch" condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version)) diff --git a/terraform/mainnet/variables.tf.example b/terraform/mainnet/variables.tf.example index 39d4c849..572db7f0 100644 --- a/terraform/mainnet/variables.tf.example +++ b/terraform/mainnet/variables.tf.example @@ -45,7 +45,7 @@ variable "log_level" { variable "app_version" { description = "App version, same as docker image version" - default = "0.0.84" + default = "0.0.85" validation { error_message = "Must be valid semantic version. $Major.$Minor.$Patch" condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version)) diff --git a/terraform/stagenet/variables.tf.example b/terraform/stagenet/variables.tf.example index bc2c0751..927ee0d0 100644 --- a/terraform/stagenet/variables.tf.example +++ b/terraform/stagenet/variables.tf.example @@ -45,7 +45,7 @@ variable "log_level" { variable "app_version" { description = "App version, same as docker image version" - default = "0.0.84" + default = "0.0.85" validation { error_message = "Must be valid semantic version. $Major.$Minor.$Patch" condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version)) diff --git a/terraform/testnet/variables.tf.example b/terraform/testnet/variables.tf.example index a2171cf1..bea8970f 100644 --- a/terraform/testnet/variables.tf.example +++ b/terraform/testnet/variables.tf.example @@ -45,7 +45,7 @@ variable "log_level" { variable "app_version" { description = "App version, same as docker image version" - default = "0.0.84" + default = "0.0.85" validation { error_message = "Must be valid semantic version. $Major.$Minor.$Patch" condition = can(regex("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", var.app_version)) diff --git a/utils/config.js b/utils/config.js index f05c005f..4d16ae06 100644 --- a/utils/config.js +++ b/utils/config.js @@ -64,6 +64,7 @@ const getAxelarConfig = async (env = ENVIRONMENT, forceCache = false) => { if (data && timeDiff(updated_at) < 600) response = toJson(data); else { response = await request(`https://axelar-${env}.s3.us-east-2.amazonaws.com/configs/${env}-config-1.x.json`); + if (response?.tokenAddressToAsset) delete response.tokenAddressToAsset; if (response?.assets) await write(AXELAR_CONFIG_COLLECTION, cacheId, { data: JSON.stringify(response), updated_at: moment().valueOf() }); else if (Object.keys({ ...toJson(data) }).length > 0) response = toJson(data); }