Skip to content

Commit

Permalink
Merge pull request #26 from eco-stake/cache-and-decimal-fixes
Browse files Browse the repository at this point in the history
Cache and decimal fixes
  • Loading branch information
tombeynon authored Jul 11, 2022
2 parents 3dc8f23 + dbc062a commit f9bbe5a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chains/chainAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function ChainAsset(data) {
display,
symbol,
denom: base.denom,
decimals: token?.exponent || 6,
decimals: token?.exponent ?? 6,
coingecko_id,
base,
token,
Expand Down
16 changes: 12 additions & 4 deletions proxy/proxyController.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ const { createProxyServer } = httpProxy;

const CACHED_REQUESTS = [
{
path: 'cosmos/staking/v1beta1/validators',
maxAge: 2 * 60
path: 'cosmos/staking/v1beta1/validators$',
maxAge: 60
},
{
path: 'cosmos/gov/v1beta1/proposals$',
maxAge: 60
},
{
path: 'cosmos/gov/v1beta1/proposals/[\\d]*/tally$',
maxAge: 60
},
{
path: 'cosmos/authz/v1beta1/grants',
Expand All @@ -31,11 +39,11 @@ const CACHED_REQUESTS = [
},
{
path: new RegExp("cosmos/staking/v1beta1/validators/[\\w\\d]*/delegations$"),
maxAge: 60
maxAge: 30
},
{
path: new RegExp("cosmos/distribution/v1beta1/delegators/[\\w\\d]*/withdraw_address$"),
maxAge: 5 * 60
maxAge: 60
}
]

Expand Down

0 comments on commit f9bbe5a

Please sign in to comment.