@merkl/api 0.10.196 → 0.10.197

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,7 +61,11 @@ export async function merklChainData(chainId) {
61
61
  const lastTreeRoot = DistributorInterface.decodeFunctionResult("lastTree", result[i++].returnData)[0]?.toString();
62
62
  const endOfDisputePeriod = BN2Number(DistributorInterface.decodeFunctionResult("endOfDisputePeriod", result[i++].returnData)[0], 0);
63
63
  const disputeLive = DistributorInterface.decodeFunctionResult("disputer", result[i++].returnData)[0] !== NULL_ADDRESS;
64
- const message = DistributorCreatorInterface.decodeFunctionResult("message", result[i++].returnData)[0]?.toString();
64
+ let message = "";
65
+ try {
66
+ message = DistributorCreatorInterface.decodeFunctionResult("message", result[i++].returnData)[0]?.toString();
67
+ }
68
+ catch { }
65
69
  const validRewardTokens = DistributorCreatorInterface.decodeFunctionResult("getValidRewardTokens()", result[i++].returnData)[0].map((t) => {
66
70
  const decimals = tokens[t.token]?.decimals
67
71
  ? tokens[t.token]?.decimals
@@ -107,6 +111,8 @@ export async function merklChainData(chainId) {
107
111
  return acc;
108
112
  }, []);
109
113
  const validRewardTokenRes = await batchMulticallCallWithRetry(chainId, { calls: validRewardTokensCalls });
114
+ if (chainId === 1101)
115
+ console.log(validRewardTokenRes);
110
116
  for (let index = 0; index < validRewardTokens.length; index++) {
111
117
  try {
112
118
  if (validRewardTokenRes[2 * index][0] &&