Skip to content

Realign#485

Merged
CedrikNikita merged 3 commits intodevelopfrom
main
Mar 11, 2026
Merged

Realign#485
CedrikNikita merged 3 commits intodevelopfrom
main

Conversation

@CedrikNikita
Copy link
Collaborator

@CedrikNikita CedrikNikita commented Mar 11, 2026

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 (accepts sk_ or legacy hex/long payloads) and using it everywhere invitation or payer accounts are constructed, including invite link generation.

Adds ensureSdkInitializeContract and refactors initializeContractTyped, useCommunityFactory, getAffiliationTreasury, and createCommunity to reliably provide sdk.initializeContract(...) even when only getContext() exists.

Updates invitation reward claiming to use a compatibility-wrapped SDK and call redeem_invitation_code via 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.

@CedrikNikita CedrikNikita merged commit e6d8aed into develop Mar 11, 2026
2 checks passed
@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for superhero-c9df18 ready!

Name Link
🔨 Latest commit fd082e0
🔍 Latest deploy log https://app.netlify.com/projects/superhero-c9df18/deploys/69b149140ae7790008f02fec
😎 Deploy Preview https://deploy-preview-485--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.

@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for fancy-gelato-7cdad5 ready!

Name Link
🔨 Latest commit fd082e0
🔍 Latest deploy log https://app.netlify.com/projects/fancy-gelato-7cdad5/deploys/69b149148fc8cf0008db126a
😎 Deploy Preview https://deploy-preview-485--fancy-gelato-7cdad5.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-trendminer-har2sa45a90zw62 ready!

Name Link
🔨 Latest commit fd082e0
🔍 Latest deploy log https://app.netlify.com/projects/superhero-trendminer-har2sa45a90zw62/deploys/69b14914bcb4440008d397b6
😎 Deploy Preview https://deploy-preview-485--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 fd082e0
🔍 Latest deploy log https://app.netlify.com/projects/celadon-youtiao-c85d92/deploys/69b14914fbd3e80008250ccd
😎 Deploy Preview https://deploy-preview-485--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.

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.

activeAccount,
{
onAccount: account,
},
Copy link

Choose a reason for hiding this comment

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

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).

Additional Locations (1)
Fix in Cursor Fix in Web

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