Skip to content

Commit

Permalink
chores: fix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
KannuSingh committed Sep 24, 2024
1 parent 5fa8b09 commit 683173c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function ConnectedTestContent({
signer: {
type: 'key',
data: {
type: 'secp256r1',
type: 'secp256k1',
publicKey: signer.publicKey
}
},
Expand Down
11 changes: 6 additions & 5 deletions apps/laboratory/src/utils/ERC7715Utils.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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)')
}
}
],
Expand Down

0 comments on commit 683173c

Please sign in to comment.