anymal-protocol 1.0.139 → 1.0.140

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
@@ -3043,52 +3043,61 @@ function useCoinbaseCreateOrganizationWallet() {
3043
3043
  status: "error"
3044
3044
  };
3045
3045
  }
3046
- const result = await sendOperationFn(
3047
- evmAddress,
3048
- orgContractAddress,
3049
- ORGANIZATION_BEACON_ABI,
3050
- "createOrganizationProxy",
3051
- [ownerAddress, orgName, orgPid]
3052
- );
3053
- if (!result.success) {
3054
- return { ...result, status: "error" };
3055
- }
3056
- let proxyAddress;
3057
3046
  try {
3058
- const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
3059
- if (txHash) {
3060
- const receipt = await publicClient.getTransactionReceipt({
3061
- hash: txHash
3062
- });
3063
- for (const log of receipt.logs) {
3064
- try {
3065
- const decoded = (0, import_viem3.decodeEventLog)({
3066
- abi: ORGANIZATION_BEACON_ABI,
3067
- data: log.data,
3068
- topics: log.topics
3069
- });
3070
- if (decoded.eventName === "NewOrganizationCreated") {
3071
- proxyAddress = decoded.args.proxyAddress;
3072
- break;
3047
+ const result = await sendOperationFn(
3048
+ evmAddress,
3049
+ orgContractAddress,
3050
+ ORGANIZATION_BEACON_ABI,
3051
+ "createOrganizationProxy",
3052
+ [ownerAddress, orgName, orgPid]
3053
+ );
3054
+ if (!result.success) {
3055
+ return { ...result, status: "error" };
3056
+ }
3057
+ let proxyAddress;
3058
+ try {
3059
+ const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
3060
+ if (txHash) {
3061
+ const receipt = await publicClient.getTransactionReceipt({
3062
+ hash: txHash
3063
+ });
3064
+ for (const log of receipt.logs) {
3065
+ try {
3066
+ const decoded = (0, import_viem3.decodeEventLog)({
3067
+ abi: ORGANIZATION_BEACON_ABI,
3068
+ data: log.data,
3069
+ topics: log.topics
3070
+ });
3071
+ if (decoded.eventName === "NewOrganizationCreated") {
3072
+ proxyAddress = decoded.args.proxyAddress;
3073
+ break;
3074
+ }
3075
+ } catch {
3073
3076
  }
3074
- } catch {
3075
3077
  }
3076
3078
  }
3079
+ } catch (e) {
3080
+ console.error("Failed to get transaction receipt:", e);
3081
+ }
3082
+ if (!proxyAddress) {
3083
+ return {
3084
+ ...result,
3085
+ status
3086
+ };
3077
3087
  }
3078
- } catch (e) {
3079
- console.error("Failed to get transaction receipt:", e);
3080
- }
3081
- if (!proxyAddress) {
3082
3088
  return {
3083
3089
  ...result,
3090
+ proxyAddress,
3084
3091
  status
3085
3092
  };
3093
+ } catch (error) {
3094
+ console.error("Org wallet creation error", error);
3095
+ return {
3096
+ success: false,
3097
+ message: "Error",
3098
+ status: "error"
3099
+ };
3086
3100
  }
3087
- return {
3088
- ...result,
3089
- proxyAddress,
3090
- status
3091
- };
3092
3101
  },
3093
3102
  [sendOperationFn, data, publicClient, status]
3094
3103
  );
package/dist/index.mjs CHANGED
@@ -2964,52 +2964,61 @@ function useCoinbaseCreateOrganizationWallet() {
2964
2964
  status: "error"
2965
2965
  };
2966
2966
  }
2967
- const result = await sendOperationFn(
2968
- evmAddress,
2969
- orgContractAddress,
2970
- ORGANIZATION_BEACON_ABI,
2971
- "createOrganizationProxy",
2972
- [ownerAddress, orgName, orgPid]
2973
- );
2974
- if (!result.success) {
2975
- return { ...result, status: "error" };
2976
- }
2977
- let proxyAddress;
2978
2967
  try {
2979
- const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
2980
- if (txHash) {
2981
- const receipt = await publicClient.getTransactionReceipt({
2982
- hash: txHash
2983
- });
2984
- for (const log of receipt.logs) {
2985
- try {
2986
- const decoded = decodeEventLog({
2987
- abi: ORGANIZATION_BEACON_ABI,
2988
- data: log.data,
2989
- topics: log.topics
2990
- });
2991
- if (decoded.eventName === "NewOrganizationCreated") {
2992
- proxyAddress = decoded.args.proxyAddress;
2993
- break;
2968
+ const result = await sendOperationFn(
2969
+ evmAddress,
2970
+ orgContractAddress,
2971
+ ORGANIZATION_BEACON_ABI,
2972
+ "createOrganizationProxy",
2973
+ [ownerAddress, orgName, orgPid]
2974
+ );
2975
+ if (!result.success) {
2976
+ return { ...result, status: "error" };
2977
+ }
2978
+ let proxyAddress;
2979
+ try {
2980
+ const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
2981
+ if (txHash) {
2982
+ const receipt = await publicClient.getTransactionReceipt({
2983
+ hash: txHash
2984
+ });
2985
+ for (const log of receipt.logs) {
2986
+ try {
2987
+ const decoded = decodeEventLog({
2988
+ abi: ORGANIZATION_BEACON_ABI,
2989
+ data: log.data,
2990
+ topics: log.topics
2991
+ });
2992
+ if (decoded.eventName === "NewOrganizationCreated") {
2993
+ proxyAddress = decoded.args.proxyAddress;
2994
+ break;
2995
+ }
2996
+ } catch {
2994
2997
  }
2995
- } catch {
2996
2998
  }
2997
2999
  }
3000
+ } catch (e) {
3001
+ console.error("Failed to get transaction receipt:", e);
3002
+ }
3003
+ if (!proxyAddress) {
3004
+ return {
3005
+ ...result,
3006
+ status
3007
+ };
2998
3008
  }
2999
- } catch (e) {
3000
- console.error("Failed to get transaction receipt:", e);
3001
- }
3002
- if (!proxyAddress) {
3003
3009
  return {
3004
3010
  ...result,
3011
+ proxyAddress,
3005
3012
  status
3006
3013
  };
3014
+ } catch (error) {
3015
+ console.error("Org wallet creation error", error);
3016
+ return {
3017
+ success: false,
3018
+ message: "Error",
3019
+ status: "error"
3020
+ };
3007
3021
  }
3008
- return {
3009
- ...result,
3010
- proxyAddress,
3011
- status
3012
- };
3013
3022
  },
3014
3023
  [sendOperationFn, data, publicClient, status]
3015
3024
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymal-protocol",
3
- "version": "1.0.139",
3
+ "version": "1.0.140",
4
4
  "description": "A React/TypeScript-based utility library for reusable functions and hooks inside of the Anymal Ecosystem.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {