anymal-protocol 1.0.38 → 1.0.40

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
@@ -1,4 +1,4 @@
1
- declare function useVerifyAccount(): (pid: string, dbAuthToken: string, bundlerClient: any, smartAccount: any, accountRewardsContractAddress: `0x${string}`) => Promise<{
1
+ declare function useVerifyAccount(): (pid: string, isCampaign: boolean, dbAuthToken: string, bundlerClient: any, smartAccount: any, accountRewardsContractAddress: `0x${string}`) => Promise<{
2
2
  success: boolean;
3
3
  message: string;
4
4
  }>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare function useVerifyAccount(): (pid: string, dbAuthToken: string, bundlerClient: any, smartAccount: any, accountRewardsContractAddress: `0x${string}`) => Promise<{
1
+ declare function useVerifyAccount(): (pid: string, isCampaign: boolean, dbAuthToken: string, bundlerClient: any, smartAccount: any, accountRewardsContractAddress: `0x${string}`) => Promise<{
2
2
  success: boolean;
3
3
  message: string;
4
4
  }>;
package/dist/index.js CHANGED
@@ -70,7 +70,7 @@ var MARKETPLACE_ABI = [{ "inputs": [{ "internalType": "address", "name": "target
70
70
  // src/utils/account/useVerifyAccount.ts
71
71
  function useVerifyAccount() {
72
72
  return (0, import_react.useCallback)(
73
- async (pid, dbAuthToken, bundlerClient, smartAccount, accountRewardsContractAddress) => {
73
+ async (pid, isCampaign, dbAuthToken, bundlerClient, smartAccount, accountRewardsContractAddress) => {
74
74
  if (!dbAuthToken || !bundlerClient || !smartAccount || !accountRewardsContractAddress || !pid) {
75
75
  return {
76
76
  success: false,
@@ -80,7 +80,7 @@ function useVerifyAccount() {
80
80
  const callData = (0, import_viem.encodeFunctionData)({
81
81
  abi: VERIFY_ACCOUNT_ABI,
82
82
  functionName: "claimRewardByName",
83
- args: ["petastic-signup-campaign-1", pid]
83
+ args: [isCampaign ? "petastic-signup-campaign-1" : "default", pid]
84
84
  });
85
85
  try {
86
86
  const userOpHash = await bundlerClient.sendUserOperation({
@@ -91,8 +91,7 @@ function useVerifyAccount() {
91
91
  data: callData
92
92
  }
93
93
  ],
94
- maxPriorityFeePerGas: (0, import_viem.parseGwei)("5.599"),
95
- maxFeePerGas: (0, import_viem.parseGwei)("5.599")
94
+ maxPriorityFeePerGas: (0, import_viem.parseGwei)("0.001")
96
95
  });
97
96
  await bundlerClient.waitForUserOperationReceipt({
98
97
  hash: userOpHash,
@@ -468,8 +467,7 @@ function useMintAnymalNFT() {
468
467
  data: callData
469
468
  }
470
469
  ],
471
- maxPriorityFeePerGas: (0, import_viem2.parseGwei)("5.599"),
472
- maxFeePerGas: (0, import_viem2.parseGwei)("5.599")
470
+ maxPriorityFeePerGas: (0, import_viem2.parseGwei)("0.001")
473
471
  });
474
472
  await bundlerClient.waitForUserOperationReceipt({
475
473
  hash: userOpHash,
@@ -824,8 +822,8 @@ function useProcessPartialKibblePayment() {
824
822
  data: callData
825
823
  }
826
824
  ],
827
- maxPriorityFeePerGas: (0, import_viem3.parseGwei)("0.001"),
828
- maxFeePerGas: (0, import_viem3.parseGwei)("0.01")
825
+ maxPriorityFeePerGas: (0, import_viem3.parseGwei)("0.001")
826
+ // maxFeePerGas: parseGwei("0.01"),
829
827
  });
830
828
  await bundlerClient.waitForUserOperationReceipt({
831
829
  hash: userOpHash,
@@ -870,8 +868,8 @@ function useApproveKibbleToken() {
870
868
  data: callData
871
869
  }
872
870
  ],
873
- maxPriorityFeePerGas: (0, import_viem4.parseGwei)("0.001"),
874
- maxFeePerGas: (0, import_viem4.parseGwei)("0.01")
871
+ maxPriorityFeePerGas: (0, import_viem4.parseGwei)("0.001")
872
+ // maxFeePerGas: parseGwei("0.01"),
875
873
  });
876
874
  await bundlerClient.waitForUserOperationReceipt({
877
875
  hash: userOpHash,
package/dist/index.mjs CHANGED
@@ -25,7 +25,7 @@ var MARKETPLACE_ABI = [{ "inputs": [{ "internalType": "address", "name": "target
25
25
  // src/utils/account/useVerifyAccount.ts
26
26
  function useVerifyAccount() {
27
27
  return useCallback(
28
- async (pid, dbAuthToken, bundlerClient, smartAccount, accountRewardsContractAddress) => {
28
+ async (pid, isCampaign, dbAuthToken, bundlerClient, smartAccount, accountRewardsContractAddress) => {
29
29
  if (!dbAuthToken || !bundlerClient || !smartAccount || !accountRewardsContractAddress || !pid) {
30
30
  return {
31
31
  success: false,
@@ -35,7 +35,7 @@ function useVerifyAccount() {
35
35
  const callData = encodeFunctionData({
36
36
  abi: VERIFY_ACCOUNT_ABI,
37
37
  functionName: "claimRewardByName",
38
- args: ["petastic-signup-campaign-1", pid]
38
+ args: [isCampaign ? "petastic-signup-campaign-1" : "default", pid]
39
39
  });
40
40
  try {
41
41
  const userOpHash = await bundlerClient.sendUserOperation({
@@ -46,8 +46,7 @@ function useVerifyAccount() {
46
46
  data: callData
47
47
  }
48
48
  ],
49
- maxPriorityFeePerGas: parseGwei("5.599"),
50
- maxFeePerGas: parseGwei("5.599")
49
+ maxPriorityFeePerGas: parseGwei("0.001")
51
50
  });
52
51
  await bundlerClient.waitForUserOperationReceipt({
53
52
  hash: userOpHash,
@@ -423,8 +422,7 @@ function useMintAnymalNFT() {
423
422
  data: callData
424
423
  }
425
424
  ],
426
- maxPriorityFeePerGas: parseGwei2("5.599"),
427
- maxFeePerGas: parseGwei2("5.599")
425
+ maxPriorityFeePerGas: parseGwei2("0.001")
428
426
  });
429
427
  await bundlerClient.waitForUserOperationReceipt({
430
428
  hash: userOpHash,
@@ -779,8 +777,8 @@ function useProcessPartialKibblePayment() {
779
777
  data: callData
780
778
  }
781
779
  ],
782
- maxPriorityFeePerGas: parseGwei3("0.001"),
783
- maxFeePerGas: parseGwei3("0.01")
780
+ maxPriorityFeePerGas: parseGwei3("0.001")
781
+ // maxFeePerGas: parseGwei("0.01"),
784
782
  });
785
783
  await bundlerClient.waitForUserOperationReceipt({
786
784
  hash: userOpHash,
@@ -825,8 +823,8 @@ function useApproveKibbleToken() {
825
823
  data: callData
826
824
  }
827
825
  ],
828
- maxPriorityFeePerGas: parseGwei4("0.001"),
829
- maxFeePerGas: parseGwei4("0.01")
826
+ maxPriorityFeePerGas: parseGwei4("0.001")
827
+ // maxFeePerGas: parseGwei("0.01"),
830
828
  });
831
829
  await bundlerClient.waitForUserOperationReceipt({
832
830
  hash: userOpHash,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymal-protocol",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
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
  "module": "dist/index.js",