@funkit/core 2.3.4 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -15039,12 +15039,21 @@ import {
15039
15039
  async function getOnChainGroupData(groupId, chain, walletAddr) {
15040
15040
  const userAuthContractAddr = await chain.getAddress("userAuthAddress");
15041
15041
  const groupKey = keccak2566(concat5([groupId, userAuthContractAddr]));
15042
- const storedGroupData = await WALLET_CONTRACT_INTERFACE.readFromChain(
15043
- walletAddr,
15044
- "getState",
15045
- [groupKey],
15046
- chain
15047
- );
15042
+ let storedGroupData;
15043
+ try {
15044
+ storedGroupData = await WALLET_CONTRACT_INTERFACE.readFromChain(
15045
+ walletAddr,
15046
+ "getState",
15047
+ [groupKey],
15048
+ chain
15049
+ );
15050
+ } catch (err) {
15051
+ if (err instanceof Error && err.message.match(/returned no data/)) {
15052
+ storedGroupData = "0x";
15053
+ } else {
15054
+ throw err;
15055
+ }
15056
+ }
15048
15057
  if (storedGroupData === "0x") {
15049
15058
  return {
15050
15059
  memberIds: [],