Skip to content

Commit

Permalink
Merge pull request #44 from axelarnetwork/feat/getIBCSupply
Browse files Browse the repository at this point in the history
feat: break supply pagination only when got valid supply
  • Loading branch information
nrsirapop authored May 15, 2024
2 parents 7b3a04d + 8ac8562 commit 0ab4103
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "axelarscan-api",
"version": "0.0.17",
"description": "Axelarscan API",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion terraform/devnet-amplifier/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ resource "aws_apigatewayv2_api_mapping" "devnet-amplifier" {
domain_name = data.aws_api_gateway_domain_name.devnet_amplifier.id
stage = aws_apigatewayv2_stage.devnet_amplifier.id
api_mapping_key = local.url_subpath_api_mapping
}
}
2 changes: 1 addition & 1 deletion terraform/devnet-amplifier/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.17"
default = "0.0.18"
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))
Expand Down
2 changes: 1 addition & 1 deletion terraform/mainnet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.17"
default = "0.0.18"
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))
Expand Down
2 changes: 1 addition & 1 deletion terraform/stagenet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.17"
default = "0.0.18"
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))
Expand Down
2 changes: 1 addition & 1 deletion terraform/testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ resource "aws_apigatewayv2_api_mapping" "testnet" {
domain_name = data.aws_api_gateway_domain_name.testnet.id
stage = aws_apigatewayv2_stage.testnet.id
api_mapping_key = local.url_subpath_api_mapping
}
}
2 changes: 1 addition & 1 deletion terraform/testnet/variables.tf.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ variable "log_level" {

variable "app_version" {
description = "App version, same as docker image version"
default = "0.0.17"
default = "0.0.18"
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))
Expand Down
2 changes: 1 addition & 1 deletion utils/chain/cosmos.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const getIBCSupply = async (chain, denomData) => {

supply = supplies.find(d => equalsIgnoreCase(d.denom, ibc_denom))?.amount;
responsive = isNumber(supply) || (!!response?.supply && !nextKey);
if ((isNumber(supply) && nextKey) || !responsive) break;
if (isNumber(supply) && nextKey) break;
}

if (!(supply && supply !== '0') && responsive) supply = '0';
Expand Down

0 comments on commit 0ab4103

Please sign in to comment.