Skip to content

Conversation

@liobrasil
Copy link
Collaborator

@liobrasil liobrasil commented Jan 19, 2026

Summary

Fixes #30

Previously, getPendingRequestsByUserUnpacked only returned native FLOW balances, which made it harder for clients to surface per-token pending/refund balances.

Note: balanceTokens/pendingBalances/claimableRefundsArray currently cover NATIVE_FLOW and (when configured) WFLOW only. Other supported ERC20 balances remain queryable via getUserPendingBalance(user, token) and getClaimableRefund(user, token).

Changes:

  • Solidity: Return balanceTokens[], pendingBalances[], and claimableRefundsArray[] instead of single uint256 values
  • Cadence: Update PendingRequestsInfo struct to use dictionaries pendingBalances: {String: UFix64} and claimableRefunds: {String: UFix64}
  • Update ABI decoding to handle new array types
  • Update all tests to use new return format

Test plan

  • All 70 Solidity tests pass
  • All 4 Cadence test suites pass
  • Verify integration with frontend clients using the new return format

🤖 Generated with Claude Code

liobrasil and others added 2 commits January 19, 2026 14:18
…packed

Previously, `getPendingRequestsByUserUnpacked` only returned native FLOW
balances, ignoring ERC20/WFLOW balances. This made it impossible for
clients to see pending balances for non-native tokens.

Changes:
- Solidity: Return `balanceTokens[]`, `pendingBalances[]`, and
  `claimableRefundsArray[]` instead of single uint256 values
- Cadence: Update `PendingRequestsInfo` struct to use dictionaries
  `pendingBalances: {String: UFix64}` and `claimableRefunds: {String: UFix64}`
- Update ABI decoding to handle new array types
- Update all tests to use new return format

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FLOW-15: User Pending Balance View Is Native-Only

2 participants