Environment
- Porto SDK:
v0.2.37
- Wagmi:
v2.19.3
- Viem:
v2.38.6
- Next.js:
16.0.1
- Network: Base mainnet
Problem Description
Permissions are successfully granted during wallet connection (user sees and approves the permission popup showing ETH spending limit and contract interactions), but subsequent sendCalls operations still trigger transaction confirmation popups instead of using the pre-authorized permissions.
Expected Behavior
According to Porto documentation, once permissions are granted via wallet_grantPermissions, they should automatically apply to subsequent wallet_sendCalls without requiring additional user confirmation:
"Once permissions have been granted, they will be automatically applied to any calls made by the Application via wallet_sendCalls"
Actual Behavior
After approving permissions during connection, attempting to execute a pre-authorized contract call still shows a Porto transaction confirmation popup requesting user approval.
Implementation Details
1. Permissions granted during connection:
// porto-connect-button.tsx
connect({
connector: portoConnector,
capabilities: {
grantPermissions: getOnboardingPermissions(),
},
});
2. Permission structure:
// onboarding-permissions.ts
export function getOnboardingPermissions() {
return {
expiry: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour
feeToken: {
limit: "1",
},
permissions: {
calls: [
{
signature: "registerWithInvite(string,address,uint256,address,bytes)",
to: "0x63e7b8F8A8d42b043fe58Be1243d7cBcb1Ca5514", // L2Registrar
},
{
signature: "multicall(bytes[])",
to: "0xa609955257eacbbd566a1fa654e6c5f4b1fdc9e2", // L2Registry
},
],
},
} as const;
}
3. Call execution (after permissions granted):
// use-register-subdomain.ts
const result = await sendCallsAsync({
calls: [
{
abi: L2RegistrarABI,
functionName: "registerWithInvite",
to: "0x63e7b8F8A8d42b043fe58Be1243d7cBcb1Ca5514",
args: [label, recipient, expiration, inviter, signature],
},
],
capabilities: {
atomicBatch: {
supported: true,
},
},
});
Steps to Reproduce
- Connect Porto wallet using
connect() with capabilities.grantPermissions parameter
- User approves the permission popup (sees "up to 11 ETH" spending limit and contract interaction permissions)
- Execute
sendCalls with a pre-authorized contract function (registerWithInvite)
- Observe: Transaction confirmation popup still appears, asking user to approve the transaction
Questions
- Is there additional configuration needed to associate granted permissions with subsequent calls?
- Should the permission context/ID returned from the grant be explicitly passed to
sendCalls?
- Is this a known issue in
v0.2.37?
- Are we missing something in our implementation?
Additional Context
- User confirmed seeing the permission details in the approval popup ("up to 11 ETH" spending limit and contract interactions), suggesting permissions were properly formatted and displayed by Porto
- The permission popup appears and is approved successfully during connection
- Only the
atomicBatch capability is currently passed to sendCalls - not sure if granted permissions need to be explicitly referenced
Any guidance on the correct implementation would be greatly appreciated!
Environment
v0.2.37v2.19.3v2.38.616.0.1Problem Description
Permissions are successfully granted during wallet connection (user sees and approves the permission popup showing ETH spending limit and contract interactions), but subsequent
sendCallsoperations still trigger transaction confirmation popups instead of using the pre-authorized permissions.Expected Behavior
According to Porto documentation, once permissions are granted via
wallet_grantPermissions, they should automatically apply to subsequentwallet_sendCallswithout requiring additional user confirmation:Actual Behavior
After approving permissions during connection, attempting to execute a pre-authorized contract call still shows a Porto transaction confirmation popup requesting user approval.
Implementation Details
1. Permissions granted during connection:
2. Permission structure:
3. Call execution (after permissions granted):
Steps to Reproduce
connect()withcapabilities.grantPermissionsparametersendCallswith a pre-authorized contract function (registerWithInvite)Questions
sendCalls?v0.2.37?Additional Context
atomicBatchcapability is currently passed tosendCalls- not sure if granted permissions need to be explicitly referencedAny guidance on the correct implementation would be greatly appreciated!