Conversation
…eftovers Fix sdk migration leftovers
✅ Deploy Preview for superhero-c9df18 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for fancy-gelato-7cdad5 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for superhero-trendminer-har2sa45a90zw62 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for celadon-youtiao-c85d92 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| activeAccount, | ||
| { | ||
| onAccount: account, | ||
| }, |
There was a problem hiding this comment.
Claimed invitation detail parsing may lose data
Medium Severity
The claim call changed from affiliationTreasury.redeemInvitationCode(invitationCode, activeAccount) (wrapper passing two values) to affiliationTreasury.contract.redeem_invitation_code(activeAccount, { onAccount: account }) (direct call with one contract argument). The transaction-parsing code in useInvitations.ts still reads tx.tx?.arguments?.[1]?.value to extract the claimer address, based on the old two-argument layout. With only one on-chain argument now, arguments[1] will be undefined, causing the code to fall back to a bare true instead of returning detailed ClaimedInfo (claimedBy, claimedAt, claimTxHash).


Note
Medium Risk
Touches wallet/secret-key handling and on-chain contract call paths (invitation redemption, community factory/treasury init), so any mismatch could break transactions; scope is contained to SDK compatibility and key normalization.
Overview
Improves aepp-sdk v14 compatibility by introducing
normalizeSecretKey(acceptssk_or legacy hex/long payloads) and using it everywhere invitation or payer accounts are constructed, including invite link generation.Adds
ensureSdkInitializeContractand refactorsinitializeContractTyped,useCommunityFactory,getAffiliationTreasury, andcreateCommunityto reliably providesdk.initializeContract(...)even when onlygetContext()exists.Updates invitation reward claiming to use a compatibility-wrapped SDK and call
redeem_invitation_codevia the underlying typed contract, with a clearer error message for unsupported/corrupted secret keys.Written by Cursor Bugbot for commit fd082e0. This will update automatically on new commits. Configure here.