Skip to content

Fix sdk migration leftovers#484

Merged
CedrikNikita merged 2 commits intomainfrom
hotfix/fix-sdk-migration-leftovers
Mar 11, 2026
Merged

Fix sdk migration leftovers#484
CedrikNikita merged 2 commits intomainfrom
hotfix/fix-sdk-migration-leftovers

Conversation

@CedrikNikita
Copy link
Collaborator

@CedrikNikita CedrikNikita commented Mar 11, 2026

Note

Medium Risk
Touches contract initialization and signing paths used for invitation claiming/revoking and sponsored profile transactions; mistakes could break on-chain interactions across networks.

Overview
Completes the aepp-sdk v14 migration by adding ensureSdkInitializeContract and routing contract creation through a compatibility initializeContract shim, then applying it across community factory/affiliation initialization and createCommunity.

Introduces normalizeSecretKey to accept legacy/hex secret formats and consistently produce sk_ secrets, updating invitation link generation, invitation claim/revoke flows, and payForProfileTx payer key handling; invitation claiming now uses the typed contract method (redeem_invitation_code) with explicit onAccount and adds a clearer error for invalid/corrupted invite keys.

Written by Cursor Bugbot for commit 45f210e. This will update automatically on new commits. Configure here.

@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for superhero-trendminer-har2sa45a90zw62 ready!

Name Link
🔨 Latest commit 45f210e
🔍 Latest deploy log https://app.netlify.com/projects/superhero-trendminer-har2sa45a90zw62/deploys/69b14793f42639000841e512
😎 Deploy Preview https://deploy-preview-484--superhero-trendminer-har2sa45a90zw62.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for celadon-youtiao-c85d92 ready!

Name Link
🔨 Latest commit 45f210e
🔍 Latest deploy log https://app.netlify.com/projects/celadon-youtiao-c85d92/deploys/69b147933ba938000828ee72
😎 Deploy Preview https://deploy-preview-484--celadon-youtiao-c85d92.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for superhero-c9df18 ready!

Name Link
🔨 Latest commit 45f210e
🔍 Latest deploy log https://app.netlify.com/projects/superhero-c9df18/deploys/69b1479320bfc00008036910
😎 Deploy Preview https://deploy-preview-484--superhero-c9df18.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@CedrikNikita CedrikNikita force-pushed the hotfix/fix-sdk-migration-leftovers branch from b97459b to 45f210e Compare March 11, 2026 10:44
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

setSuccessMessage(undefined);

try {
const account = new MemoryAccount(invitationCode);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing user-friendly error handler for secret key normalization

Low Severity

The getInvitationRewardAmount function now calls normalizeSecretKey (line 72) but its catch block lacks the "Secret key" error handler that was added to the claimOrRevokeReward catch block (line 159). When normalizeSecretKey throws in getInvitationRewardAmount, users see a raw technical message like "Secret key has invalid hex format" instead of the friendlier "This invite link uses an unsupported or corrupted secret key format."

Additional Locations (1)
Fix in Cursor Fix in Web

@CedrikNikita CedrikNikita merged commit fd082e0 into main Mar 11, 2026
13 checks passed
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.

1 participant