anymal-protocol 1.0.155 → 1.0.156

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.d.mts CHANGED
@@ -437,7 +437,7 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
437
437
  data: GetUserOperationResult | undefined;
438
438
  }>;
439
439
 
440
- declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
440
+ declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`, isProduction?: boolean) => Promise<{
441
441
  success: boolean;
442
442
  message: string;
443
443
  status: string;
package/dist/index.d.ts CHANGED
@@ -437,7 +437,7 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
437
437
  data: GetUserOperationResult | undefined;
438
438
  }>;
439
439
 
440
- declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
440
+ declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`, isProduction?: boolean) => Promise<{
441
441
  success: boolean;
442
442
  message: string;
443
443
  status: string;
package/dist/index.js CHANGED
@@ -468,8 +468,8 @@ function useFetchNotifications() {
468
468
  }
469
469
 
470
470
  // src/utils/coinbase/useSendCoinbaseUserOperation.ts
471
- var import_react10 = require("react");
472
471
  var import_cdp_hooks = require("@coinbase/cdp-hooks");
472
+ var import_react10 = require("react");
473
473
  var import_viem = require("viem");
474
474
  var import_chains = require("viem/chains");
475
475
  function useSendCoinbaseUserOperation() {
@@ -483,13 +483,6 @@ function useSendCoinbaseUserOperation() {
483
483
  );
484
484
  const sendOperationFn = (0, import_react10.useCallback)(
485
485
  async (evmAddress, contractAddress, abi, functionName, args) => {
486
- console.log("sendOperationFn called with:", {
487
- evmAddress,
488
- contractAddress,
489
- functionName,
490
- args,
491
- argsLength: args.length
492
- });
493
486
  if (!evmAddress || !contractAddress || !abi || !functionName) {
494
487
  return { success: false, message: "Missing required information" };
495
488
  }
@@ -3078,7 +3071,7 @@ var import_viem4 = require("viem");
3078
3071
  function useCoinbaseMintOrgAnymalNFT() {
3079
3072
  const { sendOperationFn, status } = useSendCoinbaseUserOperation();
3080
3073
  return (0, import_react14.useCallback)(
3081
- async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress) => {
3074
+ async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress, isProduction) => {
3082
3075
  if (!passportID || !orgContractAddress || !pid || !validationContractAddress) {
3083
3076
  return {
3084
3077
  success: false,
@@ -3086,10 +3079,11 @@ function useCoinbaseMintOrgAnymalNFT() {
3086
3079
  status: "error"
3087
3080
  };
3088
3081
  }
3082
+ const metadataUrl = isProduction ? `https://nft.petastic.com/metadata/${passportID}` : `https://dev-nft.petastic.com/metadata/${passportID}`;
3089
3083
  const args = [
3090
3084
  pid,
3091
3085
  passportID,
3092
- `https://dev-nft.petastic.com/metadata/${passportID}`,
3086
+ metadataUrl,
3093
3087
  "petastic-signup-campaign-1",
3094
3088
  anymalTxId
3095
3089
  ];
package/dist/index.mjs CHANGED
@@ -387,8 +387,8 @@ function useFetchNotifications() {
387
387
  }
388
388
 
389
389
  // src/utils/coinbase/useSendCoinbaseUserOperation.ts
390
- import { useCallback as useCallback10, useMemo } from "react";
391
390
  import { useSendUserOperation } from "@coinbase/cdp-hooks";
391
+ import { useCallback as useCallback10, useMemo } from "react";
392
392
  import { createPublicClient, encodeFunctionData, http } from "viem";
393
393
  import { baseSepolia } from "viem/chains";
394
394
  function useSendCoinbaseUserOperation() {
@@ -402,13 +402,6 @@ function useSendCoinbaseUserOperation() {
402
402
  );
403
403
  const sendOperationFn = useCallback10(
404
404
  async (evmAddress, contractAddress, abi, functionName, args) => {
405
- console.log("sendOperationFn called with:", {
406
- evmAddress,
407
- contractAddress,
408
- functionName,
409
- args,
410
- argsLength: args.length
411
- });
412
405
  if (!evmAddress || !contractAddress || !abi || !functionName) {
413
406
  return { success: false, message: "Missing required information" };
414
407
  }
@@ -2997,7 +2990,7 @@ import { encodeFunctionData as encodeFunctionData2 } from "viem";
2997
2990
  function useCoinbaseMintOrgAnymalNFT() {
2998
2991
  const { sendOperationFn, status } = useSendCoinbaseUserOperation();
2999
2992
  return useCallback14(
3000
- async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress) => {
2993
+ async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress, isProduction) => {
3001
2994
  if (!passportID || !orgContractAddress || !pid || !validationContractAddress) {
3002
2995
  return {
3003
2996
  success: false,
@@ -3005,10 +2998,11 @@ function useCoinbaseMintOrgAnymalNFT() {
3005
2998
  status: "error"
3006
2999
  };
3007
3000
  }
3001
+ const metadataUrl = isProduction ? `https://nft.petastic.com/metadata/${passportID}` : `https://dev-nft.petastic.com/metadata/${passportID}`;
3008
3002
  const args = [
3009
3003
  pid,
3010
3004
  passportID,
3011
- `https://dev-nft.petastic.com/metadata/${passportID}`,
3005
+ metadataUrl,
3012
3006
  "petastic-signup-campaign-1",
3013
3007
  anymalTxId
3014
3008
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymal-protocol",
3
- "version": "1.0.155",
3
+ "version": "1.0.156",
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": {