Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/connector-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@

// --- Static background: use-cases panel ---

// v2
const SKILL_URL = 'https://agentconnect.polygon.technology/SKILL.md';

const AGENTS: {
Expand Down Expand Up @@ -144,7 +145,7 @@
const [sessionCode, setSessionCode] = useState<string>('');
const [showFunding, setShowFunding] = useState(false);
const [showDashboard, setShowDashboard] = useState(false);
const [feeTokens, setFeeTokens] = useState<any | null>(null);

Check warning on line 148 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const [selectedUseCase, setSelectedUseCase] = useState(0);
const [selectedAgent, setSelectedAgent] = useState<string>('claude');
const [copied, setCopied] = useState(false);
Expand Down Expand Up @@ -177,7 +178,7 @@
}
setCliPkHex(cli_pk_hex);
})
.catch((e: any) => setError(`Failed to load session key: ${e?.message || String(e)}`));

Check warning on line 181 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
}, [rid]);

// Fetch USD portfolio balance when wallet address is first known
Expand Down Expand Up @@ -228,7 +229,7 @@
} catch {
setFeeTokens(null);
}
} catch (e: any) {

Check warning on line 232 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
setError(e?.message || String(e));
}
})();
Expand All @@ -253,12 +254,12 @@
const VALUE_FORWARDER = '0xABAAd93EeE2a569cF0632f39B10A9f5D734777ca';
const USDC = (await resolveErc20Symbol(chainId, 'USDC'))?.address;
const USDT = (await resolveErc20Symbol(chainId, 'USDT'))?.address;
const basePermissions: any[] = [{ target: VALUE_FORWARDER, rules: [] }];

Check warning on line 257 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const searchParams = new URLSearchParams(window.location.search);
const erc20 = searchParams.get('erc20');
const erc20To = searchParams.get('erc20To');
const erc20Amount = searchParams.get('erc20Amount');
const oneOffErc20Permissions: any[] =

Check warning on line 262 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
erc20 && erc20To && erc20Amount
? (() => {
const tokenAddr = erc20.toLowerCase() === 'usdc' ? USDC : erc20;
Expand All @@ -267,7 +268,7 @@
const f = (fRaw + '0'.repeat(decimals)).slice(0, decimals);
const valueLimit = BigInt(i || '0') * 10n ** BigInt(decimals) + BigInt(f || '0');
return [
Utils.PermissionBuilder.for(tokenAddr as any)

Check warning on line 271 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
.forFunction('function transfer(address to, uint256 value)')
.withUintNParam(
'value',
Expand All @@ -278,7 +279,7 @@
)
.withAddressParam(
'to',
erc20To as any,

Check warning on line 282 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
Permission.ParameterOperation.EQUAL,
false
)
Expand All @@ -292,8 +293,8 @@
const nativeLimit = searchParams.get('nativeLimit') || searchParams.get('polLimit');
const tokenLimitsRaw = searchParams.get('tokenLimits');
const USDC_E_POLYGON = '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174';
const openTokenPermissions: any[] = [];

Check warning on line 296 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const dynamicTokenPermissions: any[] = [];

Check warning on line 297 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
if (tokenLimitsRaw) {
const parts = tokenLimitsRaw
.split(',')
Expand All @@ -305,7 +306,7 @@
const td = await resolveErc20Symbol(chainId, sym);
if (!td) throw new Error(`${sym} not found for this chain in token-directory`);
dynamicTokenPermissions.push(
Utils.PermissionBuilder.for(td.address as any)

Check warning on line 309 in packages/connector-ui/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
.forFunction('function transfer(address to, uint256 value)')
.withUintNParam(
'value',
Expand Down
Loading