diff --git a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx index b9c4c6be47..c1a9e19c23 100644 --- a/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx +++ b/apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsAsyncTest.tsx @@ -74,7 +74,7 @@ function ConnectedTestContent({ signer: { type: 'key', data: { - type: 'secp256r1', + type: 'secp256k1', publicKey: signer.publicKey } }, diff --git a/apps/laboratory/src/utils/ERC7715Utils.ts b/apps/laboratory/src/utils/ERC7715Utils.ts index 2fbb5e4047..3ac1e85902 100644 --- a/apps/laboratory/src/utils/ERC7715Utils.ts +++ b/apps/laboratory/src/utils/ERC7715Utils.ts @@ -1,6 +1,6 @@ import type { GrantPermissionsReturnType } from 'viem/experimental' import { abi as donutContractAbi, address as donutContractAddress } from './DonutContract' -import { encodeAbiParameters, hashMessage, parseEther, type Chain } from 'viem' +import { encodeAbiParameters, hashMessage, parseEther, toFunctionSelector, type Chain } from 'viem' import { WalletConnectCosigner } from './WalletConnectCosignerUtils' import { buildUserOp, type Call, type FillUserOpResponse } from './UserOpBuilderServiceUtils' import { signMessage } from 'viem/accounts' @@ -22,12 +22,13 @@ export function getPurchaseDonutPermissions(): Omit< return { permissions: [ { - type: 'contract-call-permissions', + type: 'contract-call', data: { - target: donutContractAddress, + address: donutContractAddress, abi: donutContractAbi, - valueLimit: parseEther('10').toString(), - functionName: 'purchase(uint256)' + // valueLimit: parseEther('10').toString(), + // functionName: 'purchase(uint256)', + functionSelector: toFunctionSelector('purchase(uint256)') } } ],