diff --git a/client/sdk/package.json b/client/sdk/package.json index 47285e5..751e9f3 100644 --- a/client/sdk/package.json +++ b/client/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@magicblock-labs/soar-sdk", - "version": "0.1.20", + "version": "0.1.21", "description": "Sdk bindings for the SOAR smart contract.", "repository": { "type": "git", diff --git a/client/sdk/src/soar.program.ts b/client/sdk/src/soar.program.ts index bcd81ad..1d4a279 100644 --- a/client/sdk/src/soar.program.ts +++ b/client/sdk/src/soar.program.ts @@ -661,12 +661,12 @@ export class SoarProgram { public async fetchAllLeaderboardAccounts( memcmp?: Buffer | GetProgramAccountsFilter[] ): Promise { - const achievements = await this.program.account.achievement.all(memcmp); + const leaderboards = await this.program.account.leaderBoard.all(memcmp); - return achievements.map((achievement) => + return leaderboards.map((leaderboard) => LeaderBoardAccount.fromIdlAccount( - achievement.account, - achievement.publicKey + leaderboard.account, + leaderboard.publicKey ) ); }